diff --git a/include/wx/qt/private/winevent.h b/include/wx/qt/private/winevent.h index f29b329e67..87623cf605 100644 --- a/include/wx/qt/private/winevent.h +++ b/include/wx/qt/private/winevent.h @@ -61,6 +61,7 @@ public: QObject::connect( this, &QObject::destroyed, this, &wxQtEventSignalHandler::HandleDestroyedSignal ); + Widget::setMouseTracking(true); } void HandleDestroyedSignal() diff --git a/src/qt/window.cpp b/src/qt/window.cpp index 2530a016cf..84e8e0ace1 100644 --- a/src/qt/window.cpp +++ b/src/qt/window.cpp @@ -319,8 +319,6 @@ bool wxWindowQt::Create( wxWindowQt * parent, wxWindowID id, const wxPoint & pos m_qtWindow = new wxQtWidget( parent, this ); } - - GetHandle()->setMouseTracking(true); if ( !wxWindowBase::CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) return false;