Skip to main content

Twisted Qt Integration for Qt4 and Qt5 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


Release history Release notifications | RSS feed

This version

0.6

Download files

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

Files for qt-reactor, version 0.6
Filename, size File type Python version Upload date Hashes
Filename, size qt_reactor-0.6-py2.py3-none-any.whl (6.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size qt-reactor-0.6.tar.gz (6.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page