I want create python server application using PyQt4 without GUI ( signal/slots, threads, process and other core patterns ).
How i can create this?
-
1Did you check stackoverflow.com/questions/25392471/… ??Paul Rooney– Paul Rooney2015-06-03 05:16:34 +00:00Commented Jun 3, 2015 at 5:16
-
I did't find this. Thanks.rndev– rndev2015-06-03 05:29:04 +00:00Commented Jun 3, 2015 at 5:29
1 Answer
If you need the Qt EventLoop without a GUI you can use QCoreApplication instead of QApplication: http://pyqt.sourceforge.net/Docs/PyQt4/qcoreapplication.html
From the docs:
The QCoreApplication class provides an event loop for console Qt applications.
This class is used by non-GUI applications to provide their event loop. For non-GUI application that uses Qt, there should be exactly one QCoreApplication object. For GUI applications, see QApplication.
QCoreApplication contains the main event loop, where all events from the operating system (e.g., timer and network events) and other sources are processed and dispatched. It also handles the application's initialization and finalization, as well as system-wide and application-wide settings.