Skip to content

Conversation

@Flippo24
Copy link

@Flippo24 Flippo24 commented Mar 24, 2025

I use ib_async in a separate QThread with its own QEventLoop. I had to adapt useQt for this. A custom QApplication context can now also be used.

Minimal example QApplication:

class Application(QApplication):
    def __init__(self, argv):
        super().__init__(argv)
        ...

util.patchAsyncio()
app = Application(sys.argv)
util.useQt('PySide6', qtContext=app)

in a worker thread i use:

util.patchAsyncio()
util.useQt('PySide6', qtContext=QThread.currentThread())
self.ib = IB()
self.ib.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant