[Interest] Click and hold on close button

Sérgio Martins sergio.martins at kdab.com
Wed Aug 28 12:21:29 CEST 2019

On 2019-08-27 19:09, Murphy, Sean wrote:
> 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.

FWIW, it works with Firefox, so should be possible, depending on the
amount of effort you can put :)

I would just tell the user that it behaves like notepad and 99% of other 
Windows applications.

Sérgio Martins | sergio.martins at kdab.com | Senior Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - The Qt, C++ and OpenGL Experts

More information about the Interest mailing list