diff options
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 7 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 13218fa178..a3841d3cfb 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -367,6 +367,10 @@ void QWindowPrivate::setScreen(QScreen *newScreen, bool recreate) } } +void QWindowPrivate::clearFocusObject() +{ +} + /*! Sets the \a surfaceType of the window. diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index f43c1ea8ec..8d8fca3ce6 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -129,6 +129,8 @@ public: void setScreen(QScreen *newScreen, bool recreate); + virtual void clearFocusObject(); + QWindow::SurfaceType surfaceType; Qt::WindowFlags windowFlags; QWindow *parentWindow; diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 51a0eb7d72..e977ab3d6f 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -76,6 +76,13 @@ public: } return w; } + + void clearFocusObject() + { + if (QApplicationPrivate::focus_widget) + QApplicationPrivate::focus_widget->clearFocus(); + } + }; QWidgetWindow::QWidgetWindow(QWidget *widget) |