3

I want create python server application using PyQt4 without GUI ( signal/slots, threads, process and other core patterns ).
How i can create this?

2

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.