To make it work you have to add Q_OBJECT macro like this:
Each class that defines new slots or signals must contain Q_OBJECT macro. Also remember to rerun qmake if you add that macro somewhere.Qt Code:
{ Q_OBJECT public: ...To copy to clipboard, switch view to plain text mode
If you have placed everything in a single file, say somefile.cpp, you have to add #include "somefile.moc" at the end and rerun qmake. This isn't necessary if you have placed class definition in a header file.




Reply With Quote
Bookmarks