Details
-
Bug
-
Resolution: Cannot Reproduce
-
P4: Low
-
None
-
4.7.1
-
Windows
Description
void TestAppT::mousePressEvent(QMouseEvent *event) { QMainWindow::mousePressEvent(event); // This is literally copied verbatim from the Qt drag-drop docs if (event->button() == Qt::LeftButton ) { drag = new QDrag(this); QMimeData *mimeData = new QMimeData(); mimeData->setText("Hello!"); drag->setMimeData(mimeData); dropAction = drag->exec(); qDebug() << dropAction; } }
The attached example can be used to demonstrate the bug. Hover over the main window, left-click the mouse and keeping the left mouse pressed, move the mouse cursor onto the desktop. Release the left mouse and then hover over either or both of the QPushButtons on the main window. The pushbutton hover-highlighting appears but persists indefinitely or until the buttons are pressed again.
I've reproduced this on Windows 7.
If QT_USE_NATIVE_WINDOWS=1 is added to the environment, the bug disappears. Enable alien widget debugging in qmainwindow.cpp by uncommenting
#define ALIEN_DEBUG. You should see that multiple enter/leave events are generated when hovering over either of the pushbuttons.
Attachments
For Gerrit Dashboard: QTBUG-16823 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
15181,1 | Fix a problem with mouse hover after drag and drop | 4.8 | qt/qt | Status: ABANDONED | -1 | 0 |