PDA

View Full Version : Q_OBJECT does'nt link



bnilsson
16th July 2008, 19:28
A new class I created does not link in if I include the Q_OBJECT macro:

class PAMS_Settings : public QDialog , public Ui::SettingsDialog
{
Q_OBJECT

public:


"vtable for PAMS_Settings", referenced from:
__ZTV13PAMS_Settings$non_lazy_ptr in settings.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


If I leave it out it links but then my signals does't work.
Has anyone seen this before and give me a hint?

BN

jpn
16th July 2008, 20:01
Did you re-run qmake after adding Q_OBJECT?

bnilsson
16th July 2008, 20:22
Apparently not.
I removed all build files, the Xcode project itself and did qmake.
Then it all built ok.

Thanks.