PDA

View Full Version : event loop isStarted() signal?



Xerion
18th February 2008, 20:10
Hello all,

I've got the following situation:
I have created a thread which will take care off all the database interaction. When i initialize the main class, i want to use this thread to get some date from the DB. The problem is that i can't communicate with the thread since the main thread event loop isn't running yet.

Is there a way to communicat without the signal-slot?

I also had another sollution:
If there is a way to continue the initialisation after app.exec() is called, i can use the signal-slot mechanism. But, is there a way to detect that? QThread has got the isStarted() signal, but i can't find anything similar for the qapp.

Kind regards

jacek
18th February 2008, 21:45
If there is a way to continue the initialisation after app.exec() is called,
You can use QTimer::singleShot( 0, object, SLOT( someSlot() ) ). someSlot will be invoked as soon as the main event loop starts.