Including resource files in Qt Creator build directory

前端 未结 3 1452
生来不讨喜
生来不讨喜 2020-12-30 08:15

I have a project I am working on with Qt Creator and I\'m trying to get it to add my resource files to my build directories (output) automatically. I have the files in the p

3条回答
  •  鱼传尺愫
    2020-12-30 08:59

    Check out the Qt Resource System.

    To add the resource file into your project, you have add the following in your .pro file..

    RESOURCES = application.qrc

    Detailed examples available in the Qt Docs..

    Once added into the pro file, a separate .qrc file will be added into your Qt project with which you can double click and add your desired resources like icons, translation files etc.,

    Hope it helps..

提交回复
热议问题