summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 2e724e1b3c..0d08316945 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -54,6 +54,8 @@
#include <QtCore/QDebug>
+#include <QStyleHints>
+
QT_BEGIN_NAMESPACE
/*!
@@ -741,30 +743,42 @@ QObject *QWindow::focusObject() const
return const_cast<QWindow *>(this);
}
+void QWindow::show()
+{
+ if (qApp->styleHints()->showIsFullScreen())
+ showFullScreen();
+ else
+ showNormal();
+}
+
+void QWindow::hide()
+{
+ setVisible(false);
+}
void QWindow::showMinimized()
{
setWindowState(Qt::WindowMinimized);
- show();
+ setVisible(true);
}
void QWindow::showMaximized()
{
setWindowState(Qt::WindowMaximized);
- show();
+ setVisible(true);
}
void QWindow::showFullScreen()
{
setWindowState(Qt::WindowFullScreen);
- show();
+ setVisible(true);
requestActivateWindow();
}
void QWindow::showNormal()
{
setWindowState(Qt::WindowNoState);
- show();
+ setVisible(true);
}
bool QWindow::close()