Issue
How to await this function (src ) in the main loop of pyside2:
async def do_request(value): #asyncqt maybe possible
#print("do request")
await asyncio.sleep(value)
#print("request finished")
return value
async def eventFilter(self, source, event): #impossible, needs pyside2 rewrite
...
I am very reluctant to use any nonoffical stuff, so pyside2: i looked into examples of pyside2 having Qthreads examples, but no asyncio await. My lib uses asyncio so how to await in pyside2?
This is a serious issue: The https://github.com/harvimt/quamash/issues/104 does not support pyside2 and https://github.com/gmarull/asyncqt is not maintained. What is the solution?
Please how to integrate such simple call. i fear breaks/bugs on nonmaintained repos
Solution
after watching https://www.youtube.com/watch?v=ol5IuJyw-Tg using built in qthread qrunnable qthread
to not block main gui thread is way to go.
for examples see https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/corelib and browse the source (its for pyside2)
Answered By - droid192
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.