Skip to content
Twisted and PyQt5 eventloop integration. Borrowed from https://github.com/nehbit/aether-public/blob/master/qt5reactor.py
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
src/qt5reactor
twisted/plugins
.coveragerc
.gitattributes 21 Test infrastructure (#24) Nov 30, 2018
.gitignore
.travis.yml 21 Test infrastructure (#24) Nov 30, 2018
LICENSE add meejah to LICENSE Nov 3, 2018
MANIFEST.in 21 Test infrastructure (#24) Nov 30, 2018
README.rst 21 Test infrastructure (#24) Nov 30, 2018
appveyor.yml
get_version.py
requirements.test.txt 21 Test infrastructure (#24) Nov 30, 2018
requirements.tox.txt 21 Test infrastructure (#24) Nov 30, 2018
setup.cfg
setup.py
tox.ini 21 Test infrastructure (#24) Nov 30, 2018
versioneer.py

README.rst

Qt5Reactor

PyPI version supported Python versions Travis build status AppVeyor build status Circle build status source on GitHub

Using the QtReactor

Install using pip

pip install qt5reactor

Before running / importing any other Twisted code, invoke:

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

or

app = QApplication(sys.argv) # your code to init QtCore
import qt5reactor
qt5reactor.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.

There is also pytest-twisted for use with pytest. You can specify to use the qt5reactor by adding --reactor=qt5reactor.

You can’t perform that action at this time.