tags:

views:

54

answers:

2

I am goint to develop some console application, and after that probably add GUI to its. I am begginer with QT and I wonder if I should use signal and slots with my own console object? Or if them is used only with GUI?

A: 

Are you going to be updating the console screen when some event/signal happens?

juxstapose
I don't really know, are there any happends in console app? I think i could handle it without it. I also want to use all power of QT.
John X
Don't get confused between Qt signals/slots and events. Signals and slots are just Qt's clever way of handling inter-object communication. They can and should be used wherever applicable.
teukkam
+3  A: 

You can use signals and slots in a console application. You can subclass QCoreApplication or just use one as an event loop. In main(), create a QCoreApplication object along with any of your own objects that use signals and slots, connect the signals and then call .exec() on the QCoreApplication object. Make sure you have some way to signal the QCoreApplication to quit.

Arnold Spence