리소스 관리
Qt 프로젝트에 새 리소스를 추가하는 것은 일반 C++ 프로젝트에 리소스를 추가하는 것과 비슷합니다. 가장 큰 차이점은 Windows .rc 파일 대신 Qt 리소스 파일(.qrc )을 사용한다는 것입니다. .rc 파일과 달리 .qrc 파일은 Qt가 지원하는 모든 플랫폼에서 작동하며 Qt 코드에서 로드하는 것이 간단합니다.
새 리소스를 추가하려면
- Project > Add New Item > Installed > Visual C++ > Qt 로 이동합니다.
- Qt Resource File 을 선택합니다.

- Name 에 리소스 파일의 이름을 입력합니다.
- Location 에서 파일 위치를 지정합니다.
- Add 을 선택하여
.qrc파일을 생성하고 Qt Resource Editor 에서 파일을 엽니다.
- 파일에 리소스를 추가하려면 Add > Add Files 을 선택합니다.
- Prefix 에서 접두사를 변경할 수 있습니다.
나중에 Qt 코드에서 리소스를 참조할 때는 접두사, 파일 이름 및 콜론을 앞에 붙여야 합니다. 예를 들어 :/MyProject/print.bmp.
접두사 추가하기
.qrc 파일에 접두사를 추가하려면 Qt Resource Editor 에서 Add > Add Prefix 을 선택합니다.
Qt 리소스 에디터 시작하기 및 Qt 리소스 시스템도참조하십시오 .
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.