Unsolved mouseReleaseEvent not called when the mouse is released under certain circumstances
-
@Kerndog73
The event is received.
By default, the QAbstractButton just perform the nextCheckState action after it is released and the release pos contain the Button Pos.mouseReleaseEvent() -> click() -> nextCheckState()
Note: -> means the order of calls.
You can confirm it on source code.
-
@KillerSmath I understand that QAbstractButton listens to mouseReleaseEvent (I mentioned that in my original post). What I am saying is that mouseReleaseEvent isn’t called under very specific circumstances.
-
Is anyone able to reproduce this on a mac?
-
@Kerndog73
Just tested it, can't reproduce it.
Up and Down come in all cases, with prior focus or without, with tooltip or without.Tested with trackpad and Magic Trackpad on macOS 10.14.4, 2015 MacBookPro
-
I'm running 10.14.3 so maybe this was a minor bug that was fixed in 10.14.4. I'll mark this thread as solved if the software update fixes the problem.
-
@J.Hilk Updating to 10.14.4 didn't solve the problem. It's frustrating that I seem to be the only one having this problem. Maybe we're not doing the same thing? In case I wasn't clear enough, I'm tapping the trackpad. I'm not clicking the diving board trackpad (not hearing an audible "click").
It looks like I'll have to keep using my workaround. Are there any problems with the workaround? Is there a better way?
-
@Kerndog73
oh,
do you have "tab for click" active ?
I do not, and I remember an other poster in this forum, reporting inconsistencies with tab to click on macOS and the later versions of Qt! -
@J.Hilk Yes, I have tap-to-click enabled.
(Damn! I love that window screenshot feature! The drop-shadow looks so cool!)
Do you have a link to the other thread where this problem was mentioned? It's not that big of a deal though. I don't really mind overriding
mousePressEvent
and callingtoggle
(or even just ignoring the problem). After reading the docs, I should probably callnextCheckState
instead. -
@Kerndog73 said in mouseReleaseEvent not called when the mouse is released under certain circumstances:
Do you have a link to the other thread where this problem was mentioned?
that took me an abyssal amount of time to dig up.
But here you gohttps://forum.qt.io/topic/99808/no-mouse-release-event-anymore-on-tap-macos-qt-5-12
-
Apologies for posting to an old thread, but I wanted to add a clue that might be helpful.
I am seeing this behavior in a Qt project of my own, but only on Mac laptops from 2015 and later (specifically, models with a force touch trackpad), when "Tap to Click" is enabled. On earlier laptops without a force touch trackpad, the bug does not present.