QPushButton clicked() problem in Qt5 when pushing two buttons simultaneously
I ran into a problem with QPushButtons on a touch screen device when I upgraded my application from Qt 4.8.4 to 5.8.0.
- Two QPushButtons
- Touch screen device
Steps to reproduce:
- Try to push both buttons at the same time
- One of the buttons emits pressed(), released(), and clicked() signals in sequence, the other button emits nothing
- This is how it worked in Qt 4.8.4
- One of the buttons emits pressed(), and no other signals are emitted
- That button stays down even though it is not a checkable button
- If I now push the same button again, it emits released() and clicked() and pops up
- If I instead click somewhere else on the screen, the button emits only released() and pops up
- This is how it now works in Qt 5.8.0
This is really easy to reproduce, happens almost every time I try it. And like mentioned, the same code works without problems in Qt 4.8.4.
Any ideas, what has changed here? Is there some property whose default value has been changed in Qt 5, which affects this?
Sounds strange and is IMHO a bug in Qt 5.
However, this forum is not monitored for bug reports. You need to check with JIRA and file eventually a bug report there.
I agree, sounds strange and maybe a bug. I'm just surprised that I haven't found any similar problem descriptions anywhere yet. I'll add a bug in JIRA, if I can't find anything related to this with some more extensive searching.
However, I would also appreciate it if someone has the time and interest to try this in some other environments, maybe with other Qt versions as well. I reduced the problem to a minimal test application, which I'll attach here.
Seems like I don't have privileges to upload files, so I added the zipped code files to OneDrive: https://1drv.ms/u/s!Ag3FT119iSn0gR22nOOKajHiLFHH