Reputation: 517
I'm creating GUI using Qt in Visual Studio 2010. I've done quite a lot of job then I have added tab widget and subsequent rebuild ended with missing qrc_file.cpp missing and the file had really disappeared from it's directory. When I returned back to previous backup and added tab widget again problem appeared again. But It's strange because sometimes build with tab widget is successful, in this case the qrc file is deleted by something in the next build.
Thanks for your experience!
Upvotes: 0
Views: 348
Reputation: 21
qrc_something.cpp file can be missing if a file that you have added to resources is not on its designated location.
For example you add to resources file picture.png at location C:\ .
After a while you delete or remove picture.png and compiler cant find it, so it can not make qrc_something.cpp file, that is how you get the error.
To solve, simply remove picture.png from resources or change its location field in resources.
Upvotes: 1
Reputation: 741
make sure that Q_OBJECT macro is the first line in the class definition.
Upvotes: 0