Skip to main content

Twisted Qt Integration

Project description

Qt5Reactor

Using the QtReactor

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.

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 qt5reactor
qt5reactor.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 Distribution

qt5reactor-fork-0.2.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file qt5reactor-fork-0.2.tar.gz.

File metadata

File hashes

Hashes for qt5reactor-fork-0.2.tar.gz
Algorithm Hash digest
SHA256 125044203d9997acac43e200e17cd8e10683023cdbab247c46781086a60668b7
MD5 ad5f6a83ebf9bc463b37a24a68d93f94
BLAKE2b-256 c714eab6112b0d2ed801aa3764ba29bd4d71dbc8d2c6ea139722cfae74e6f16d

See more details on using hashes here.

Supported by

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