Closed adamgranthendry closed 3 years ago
Actually, this is no longer working now that I have updated my code to start the project window in full screen mode. For an update on my question, please see this SO post. It seems this issue has been part of a long-standing problem...
My code actually contained an error that was causing this problem. Please see my SO post for the solution.
Thanks for coming back to share the solution @adamgranthendry. 👍
System Info:
Windows 10 x64 Pro, Build 1909 Python: 3.8.10 pytest-qt: 4.0.2 Interface: PyQt5, version 5.15.4
Question:
I am trying to test (confirm really) that when my mouse hovers over a toolbar button that the statusbar message appears and is correct for the given button:
conftest.py
:test_view.py
:Is there a reason why my above test does not work when I remove
qapp.processEvents()
? Interesting, regardless of whether or not I setapp.setMouseTracking(True)
, the above does not work until I add the lineqapp.processEvents()
. When I add a 10 second delay withtime.sleep(10)
at the end of the Act sequence, I can see that no statusbar message appears whenqapp.processEvents()
is removed and the message appears whenqapp.processEvents()
is included.This one has me scratching my head a bit, so I'm trying to understand the logic behind why this is occuring in case I need to add
qapp.processEvents()
to further tests:No
qapp.processEvents()
:With
qapp.processEvents()
: