Deliver leave event to proper widget (not the top-level).
This commit is contained in:
parent
ed2a2dc6da
commit
47b36ae639
@ -106,7 +106,8 @@ QPointer<QWidget> qt_last_mouse_receiver = 0;
|
|||||||
void QWidgetWindow::handleEnterLeaveEvent(QEvent *event)
|
void QWidgetWindow::handleEnterLeaveEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::Leave) {
|
if (event->type() == QEvent::Leave) {
|
||||||
QApplicationPrivate::dispatchEnterLeave(0, m_widget);
|
QWidget *leave = qt_last_mouse_receiver ? qt_last_mouse_receiver.data() : m_widget;
|
||||||
|
QApplicationPrivate::dispatchEnterLeave(0, leave);
|
||||||
qt_last_mouse_receiver = 0;
|
qt_last_mouse_receiver = 0;
|
||||||
} else {
|
} else {
|
||||||
QApplicationPrivate::dispatchEnterLeave(m_widget, 0);
|
QApplicationPrivate::dispatchEnterLeave(m_widget, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user