Skip to main content

Twisted Qt integration for Qt4, Qt5, and Qt6 using qtpy

Project description

QReactor

Forked from qt5reactor which was forked from qt4reactor and now uses [qtpy](https://github.com/spyder-ide/qtpy) to provide to support both.

Using the QtReactor

Install using pip

pip install qt-reactor

Before running / importing any other Twisted code, invoke:

app = QApplication(sys.argv) # your code to init QtCore
from twisted.application import reactors
reactors.installReactor('qt')

or

app = QApplication(sys.argv) # your code to init QtCore
import qreactor
qreactor.install()

Testing

trial --reactor=qt5 [twisted] [twisted.test] [twisted.test.test_internet]

Make sure the plugin directory is in path or in the current directory for reactor discovery to work.

Testing on Python 3

trial does not work on Python3 yet. Use Twisted’s Python 3 test runner instead.

Install the reactor before calling unittest.main().

import qreactor
qreactor.install()
unittest.main(...)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qt_reactor-0.6.1-py2.py3-none-any.whl (7.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file qt_reactor-0.6.1-py2.py3-none-any.whl.

File metadata

  • Download URL: qt_reactor-0.6.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for qt_reactor-0.6.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6aa809427f30ae84d51e0b917a805312196417f09cadf951d82d297919b2577e
MD5 ff4ea40751a4676819b1b300aefce769
BLAKE2b-256 2c225e05e8c2316a46138cabe3af7788ae6ce256228b5659908697025d3bfdf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page