diff options
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index d65998ce49..b042283071 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -193,10 +193,6 @@ QWindow::~QWindow() destroy(); } -QSurface::~QSurface() -{ -} - /*! Set the \a surfaceType of the window. @@ -253,6 +249,13 @@ void QWindow::setVisible(bool visible) QGuiApplication::sendEvent(this, &showEvent); } + if (isModal()) { + if (visible) + QGuiApplicationPrivate::showModalWindow(this); + else + QGuiApplicationPrivate::hideModalWindow(this); + } + d->platformWindow->setVisible(visible); if (!visible) { @@ -1396,7 +1399,7 @@ void QWindow::resizeEvent(QResizeEvent *ev) /*! Override this to handle show events. - The show event is called when the window has requested becoming visible. + The function is called when the window has requested becoming visible. If the window is successfully shown by the windowing system, this will be followed by a resize and an expose event. @@ -1409,7 +1412,7 @@ void QWindow::showEvent(QShowEvent *ev) /*! Override this to handle hide evens. - The hide event is called when the window has requested being hidden in the + The function is called when the window has requested being hidden in the windowing system. */ void QWindow::hideEvent(QHideEvent *ev) |