[Development] QPushButton: drag and drop
lpapp at kde.org
Fri Jun 3 14:20:31 CEST 2022
It seems that QWidget::mouseReleaseEvent does not get triggered after
QDrag::exec. This causes the following issue that the QPushButton instance
gets stuck in "pressed down" (with pressed highlight, etc) state as the
following short gif shows: https://imgur.com/a/dk7zs9D
I worked this around by calling setDown(false); after drag->exec(...), but
I wonder if this is something that should be, or even can be fixed in Qt
for all OSes.
Here is a small testbed example I have put together that is really small
and reproduces the issue. This is what I also used for the above gif to
show the issue.
This is where the QDragManager::drag starts grabbing the mouse on Linux
with X11 for example:
I do not know the details very well, but from a user point of view, it
would be good to either let mouseReleaseEvent get triggered as usual after
the dragging has finished or at least not to have artifacts like the above
I have also noticed several posts on Stack Overflow, Qt Centre, etc, about
this issue without a "real solution". E.g. this dates back to 12 years ago:
What do you think about this issue?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development