Connection failed on qchildevent after converting code from qt3 to qt4
-
Hi.
The two connects in the qchildevent function in qt4 fail, and I have no idea why.
At the top left you see the values of the variables in qt4 and at the bottom right in qt3.
The only thing I notice is unknown ‘clas’.
Can anyone help me?

-
Hi and welcome to devnet,
Someone seems to have already done the job. You might want to check this project.
@SGaist Thank you.
The one in sourceforge is my project.The qchildevent situation is even stranger
-- In qt3 the events for inserted() are generated only after the exec() .
-- In qt4 the events for added() are all generated first, during the construction phase of the objects. -
Hi and welcome to devnet,
Someone seems to have already done the job. You might want to check this project.
@SGaist @giusdbg I think I found and solved (if there will be no side effects), there are different event handling in qt4.
This way the added event is called while the Sensors object is still being built, and the connect fails.
Sensor::Sensor(SensorsList *parent,const char *name): QObject(parent)
In this way the added event takes place after the construction of the Sensors
Sensor::Sensor(SensorsList *parent,const char *name): QObject()
........
setParent(parent); -
G giusdbg has marked this topic as solved on