[Qt-creator] Problems console application and Q_OBJECT
Petric Frank
pfrank at gmx.de
Thu May 14 23:07:46 CEST 2009
Hello Marc,
On Donnerstag, 14. Mai 2009, Ladnar, Marc wrote:
> Hi Petric,
>
> it is a common Qt qmake problem.
> Qmake is not called until the .pro has not changed. But qmake is the
> tool generating the Makefile commands for moc compiling.
> So you will have to do it in QtCreator like as in Qt itself. I think
> there will be no patch for QtCreator to solve this problem because it is
> located in qmake and Makefile.
> It could only be solved when in Makefile the qmake command not only gets
> called when the .pro file changed but when every project header changed,
> too. On bigger projects this will get very annoying.
> The programmer himself does know when to run qmake again because he
> added the Q_OBJECT macro into his header.
In my case i wasn't aware of that - hence the question.
I saw some vtable errors at link time. After some digging i got the idea that
moc_* files were missing resulting in this thread.
Maybe somewhere in the docs this (add Q_OBJECT in the source --> run qmake)
should be stated prominently. I haven't found such a hint in the docs myself.
> Hope that makes it a little clearer to you.
A lot. For me the issue is solved now.
> Have a nice day,
Same to you.
regards
Petric
More information about the Qt-creator-old
mailing list