PDA

View Full Version : QT console application and CTRL+C



dawwin
16th March 2011, 18:52
Hello,
I'm writing qt server application and I need functions to handle SIGINT and SIGTERM signals. I've found functions watchUnixSignal() and unixSignal() which are members of QCoreApplication, but they are not described in the QT documentation (http://doc.qt.nokia.com/latest/qcoreapplication.html). Do anyone know, why?

high_flyer
17th March 2011, 10:16
If its not documented, it means its not meant to be used, and that it can change or get deleted in any future release.
Have a look at this to help you with your problem:
http://doc.qt.nokia.com/4.7/unix-signals.html

dawwin
17th March 2011, 20:18
I've found this manual about unix signals, but i need something, what will be able to handle signals in windows. Any ideas?

high_flyer
18th March 2011, 17:35
you can use the signal() function and give it your signal handler:
http://msdn.microsoft.com/en-us/library/xdkz3x12%28v=vs.71%29.aspx