[Qt-interest] Slots in threads ?

Patric userqt at gmail.com
Fri Aug 28 12:39:10 CEST 2009


> c:/Qt/2009.03/qt/include/QtCore/../../src/corelib/kernel/qobject.h:202:
> note: candidates are: static bool QObject::connect(const QObject*, const
> char*, const QObject*, const char*, Qt::ConnectionType)

>This error and its note mean that one or both types GameBoard* and
>SimulationEngine* could not be converted to QObject*.

>This either means that one of the classes doesn't derive from QObject, or 
>that
>you forgot to #include its header file.

Well... it worked. In my thread class I have

SimulationEngine * getSimulationEngine();
SimulationEngine *simulationEngine;



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 ?



Here I have only one pointer declaration in the header, and one function 
that returns pointer to SimulationGame.



Regards,

Patric


----- Original Message ----- 
From: "Thiago Macieira" <thiago.macieira at trolltech.com>
To: <qt-interest at trolltech.com>
Sent: Friday, August 28, 2009 1:08 AM
Subject: Re: [Qt-interest] Slots in threads ?


> _______________________________________________
> 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