PDA

View Full Version : qtservice based on threaded fortune server



raj_iv
27th May 2011, 11:26
Hi,

I hve re-implemented 'threaded fortune server' example in Qt documentation as an interactive Qt service. Interactive bcause i want to show the user the same dialog box so that he can figure out port no. for fortune client example.

but how to stop the service when someone clicks on the 'Quit' button. As the 'Quit' button is connected to close() slot, the box goes out but i want the service also to be stopped when pressing on 'Quit' button. Is it possible?

Farris
27th May 2011, 12:58
connect(widget, SIGNAL(quit()),
qApp, SLOT(quit()));

where qApp = http://doc.qt.nokia.com/latest/qapplication.html#qApp