[Interest] Click and hold on close button

Murphy, Sean smurphy at walbro.com
Tue Aug 27 20:09:09 CEST 2019


One of my users reported an issue that I think falls into the 
"nothing can be done about it" category, but wanted to see 
if anyone had any ideas.

On a Windows build of our application, if the user clicks 
AND HOLDS the mouse on any of the Windows buttons (so 
the standard Windows Minimize, Maximize, and Close buttons) 
the application's event loop apparently is blocked until the 
mouse is released. This happens whether it's the QMainWindow 
window, or any currently shown dialogs.

The same application on Linux does not behave this way - at 
least on Elementary 5.0, I certainly haven't exhaustively gone 
through all flavors of Linux. But at least on that version of Linux, 
the user can click and hold the window close button and the 
application still updates the UI while the mouse button is pressed.

I've attached a sample application below that can be used to test. 
When you build and launch it, a QLabel blinks between green and 
"normal", switching palettes every second. On Windows, if you 
click and hold on any of those 3 buttons, and while holding the 
mouse, move off the original button so that the release event 
doesn't happen on the same button, the blinking will cease the 
entire time you have the button pressed. Do the same thing on 
Linux and the QLabel keeps blinking happily the entire time.

Sean




This message has been scanned for malware by Forcepoint. www.forcepoint.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clickAndHoldTest.zip
Type: application/x-zip-compressed
Size: 1975 bytes
Desc: clickAndHoldTest.zip
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190827/64a18968/attachment.bin>


More information about the Interest mailing list