Twisted Qt Integration
Project description
Using the Qt5Reactor
Qt5Reactor is compatible with both PyQt5 and PySide2.
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qt5reactor-0.6.3.tar.gz
(24.5 kB
view hashes)
Built Distribution
Close
Hashes for qt5reactor-0.6.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f01afa5874f51fbfe3cfb7a5fc4cbfcf7b65ddb603824daf145e44c370a225b |
|
MD5 | 2684d2b6d09a7131251b81f0f570dc1e |
|
BLAKE2b-256 | 2d59b1628ed0ee00317a7e51ee6c257e84f061bf1ce61474d18ec87771af2213 |