Please solve this Q_INIT_RESOURCE error
-
Dear Friends,
I'm new to Qt and i'm just implement the sample code in qt which is in the link below.but i have an error while i build this.
http://doc.qt.nokia.com/4.7-snapshot/demos-spreadsheet.html
The error is...,undefined reference to 'qInitResources_spreadsheet()' in main.cpp file. I've did this by Empty Qt project. i think may be its occurred in .pro file. can anyone please help this... Thanks in advance -
bq. Did you add spreadsheet.qrc as resource in your project?
.qrc file includes only an image... what happens if we do not include that .qrc file?.
-
The following line is in main.cpp:
@Q_INIT_RESOURCE(spreadsheet);@
that obliges you to add spreadsheet.qrc to your project.The following line is in main.cpp:
@sheet.setWindowIcon(QPixmap(":/images/interview.png"));@
So you need to add /images/interview.png as resource in spreadsheet.qrc resources file. -
I added that .qrc file now it works fine... but i thought its just an image file. thank u Qtnovice...:-)