Test the qt5_add_resource macro.

Change-Id: I94e4c9e525016405abba90bbdbe58e7786ce5bc4
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Stephen Kelly 2011-12-05 02:19:55 +01:00 committed by Qt by Nokia
parent 38ca60985e
commit db5b3afa01
4 changed files with 12 additions and 1 deletions

View File

@ -9,5 +9,7 @@ include_directories(${Qt5Core_INCLUDE_DIRS})
qt5_wrap_cpp(moc_files myobject.h)
add_executable(myobject myobject.cpp ${moc_files})
qt5_add_resources(rcc_files "pass2.qrc")
add_executable(myobject myobject.cpp ${moc_files} ${rcc_files})
target_link_libraries(myobject ${Qt5Core_LIBRARIES})

View File

@ -50,5 +50,7 @@ MyObject::MyObject(QObject *parent)
int main(int argc, char **argv)
{
MyObject myObject;
// Compile error if the resource file was not created.
Q_INIT_RESOURCE(pass2);
return 0;
}

View File

@ -0,0 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>resource_file.txt</file>
</qresource>
</RCC>

View File

@ -0,0 +1 @@
Ken sent me.