[Qt-interest] Slots in threads ?

Patric userqt at gmail.com
Fri Aug 28 13:08:41 CEST 2009


Hmm... I get the point.
But the forward declaration was just in the header. In the source I properly 
included the class. Strange, though...

Regards,
Patric

----- Original Message ----- 
From: "Sean Harmer" <sean.harmer at maps-technology.com>
To: <qt-interest at trolltech.com>
Sent: Friday, August 28, 2009 1:52 PM
Subject: Re: [Qt-interest] Slots in threads ?


> Hi,
>
> On Friday 28 Aug 2009 11:39:10 Patric wrote:
> <snip>
>> and I was forward declaring the SimulationEngine class with
>>
>> class SimulationEngine;
>>
>> and I just changed it to #include "simulationengine.h"
>>
>> but why it was not working before ?
> It did not work before as just having a forward declaration is not enough
> information for the compiler to determine that those objects are QObjects 
> when
> it compiles the connect() statement. Once you #include the header files 
> for
> your object(s) then the compiler can determine that they do inherit 
> QObject.
>
> Cheers,
>
> Sean
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 




More information about the Qt-interest-old mailing list