Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.0 Beta1
-
Windows 7, Ubuntu 12.04
Description
QFrame should emit leave event during mouseReleaseEvent() in order that the hover effect can be removed.
Test program attached. Notable code shown below.
void DraftMenuButton::mouseReleaseEvent( QMouseEvent *event ) { Q_UNUSED(event); QMessageBox draftMessageBox; draftMessageBox.setText("Click OK to close me."); draftMessageBox.exec(); // Hover highlight stays in Qt 5, but not reproducible on Qt 4 environment. //QTimer::singleShot(0, dialog, SLOT(exec())); //QFocusFrame::mouseReleaseEvent(event); #if USE_WORKAROUND // Workaround for Qt 5 environment. // The hover state is reset after a leave event sent. QEvent e(QEvent::Leave); QApplication::sendEvent(this, &e); #endif }
Hover highlight stays in Qt 5, but not reproducible on Qt 4 environment.
Attachments
Issue Links
- relates to
-
QTBUG-36862 QToolButton remains in hover state after menu closed
- Closed
-
QTBUG-41780 QToolButton hovered rendering not cleared
- Closed
For Gerrit Dashboard: QTBUG-38021 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
97698,6 | Ensure that a leave event is sent to a popup that is being closed | 5.4 | qt/qtbase | Status: ABANDONED | 0 | 0 |
98731,2 | Ensure that a leave event is sent to a popup that is being closed | dev | qt/qtbase | Status: MERGED | +2 | 0 |