summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qstylehints.cpp18
-rw-r--r--src/gui/kernel/qstylehints.h2
2 files changed, 19 insertions, 1 deletions
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 7ff0f9f860..7fc89112e6 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -305,7 +305,7 @@ int QStyleHints::cursorFlashTime() const
\note The platform may still choose to show certain windows non-fullscreen,
such as popups or dialogs. This property only reports the default behavior.
- \sa QWindow::show()
+ \sa QWindow::show(), showIsMaximized()
*/
bool QStyleHints::showIsFullScreen() const
{
@@ -313,6 +313,22 @@ bool QStyleHints::showIsFullScreen() const
}
/*!
+ \property QStyleHints::showIsMaximized
+ \brief \c true if the platform defaults to windows being maximized,
+ otherwise \c false.
+
+ \note The platform may still choose to show certain windows non-maximized,
+ such as popups or dialogs. This property only reports the default behavior.
+
+ \sa QWindow::show(), showIsFullScreen()
+ \since 5.6
+*/
+bool QStyleHints::showIsMaximized() const
+{
+ return hint(QPlatformIntegration::ShowIsMaximized).toBool();
+}
+
+/*!
\property QStyleHints::passwordMaskDelay
\brief the time, in milliseconds, a typed letter is displayed unshrouded
in a text input field in password mode.
diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h
index 82eb8a6f7d..c5b8241e07 100644
--- a/src/gui/kernel/qstylehints.h
+++ b/src/gui/kernel/qstylehints.h
@@ -56,6 +56,7 @@ class Q_GUI_EXPORT QStyleHints : public QObject
Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay STORED false CONSTANT FINAL)
Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL)
Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL)
+ Q_PROPERTY(bool showIsMaximized READ showIsMaximized STORED false CONSTANT FINAL)
Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL)
Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL)
Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL)
@@ -78,6 +79,7 @@ public:
void setCursorFlashTime(int cursorFlashTime);
int cursorFlashTime() const;
bool showIsFullScreen() const;
+ bool showIsMaximized() const;
int passwordMaskDelay() const;
QChar passwordMaskCharacter() const;
qreal fontSmoothingGamma() const;