Yes, you can download resources. Unfortunately, the qrc editor that creates qrc files is part of the Qt Addin for VS ...
But you can create this xml file by hand, for the format see here
After creating the qrc file, you have at least two possibilities:
A) Use qmake
Add a link to your qrc file in your pro file:
RESOURCES = ApplicationResources.qrc
Recover your vcproj from your pro using qmake
qmake -tp vc
B) If you do not generate your vcproj file from your pro file, you can:
Manually add your qrc file to your solution, for example, in the following path:
Resource Files /Res/ApplicationResources.qrc
Add the following qrc file properties properties to visual studio:
command line : $ (QTDIR) \ bin \ rcc.exe -name ApplicationResources res \ ApplicationResources.qrc -o $ (IntDir) \ qrc__ ApplicationResources.cpp
Description : RCC res / ApplicationResources.qrc
Output : $ (IntDir) \ qrc__ ApplicationResources.cpp
C) You can also use an external binary resource file
Command line: rcc -binary myresource.qrc -o myresource.rcc
In the application you need to register a resource file: QResource :: registerResource ("/path/to/myresource.rcc");
To use a resource file in source code, see doc
However, like cheez, I also suggest using the qmake and pro file and not editing the properties manually in Visual Studio ...
Hope this helps!
source share