summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp2
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp2
-rw-r--r--src/widgets/kernel/qapplication.cpp1
-rw-r--r--src/widgets/kernel/qapplication.h4
4 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
index f1f51c0582..138d0dfa1b 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
//! [3]
QSize MyWidget::sizeHint() const
{
- return QSize(80, 25).expandedTo(QApplication::globalStrut());
+ return QSize(80, 25);
}
//! [3]
diff --git a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
index 5e1f0883e7..a7bce6d378 100644
--- a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
//! [3]
QSize MyWidget::sizeHint() const
{
- return QSize(80, 25).expandedTo(QApplication::globalStrut());
+ return QSize(80, 25);
}
//! [3]
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index eea97b2c0b..842c0ea9e6 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1224,6 +1224,7 @@ void QApplication::setColorSpec(int spec)
\property QApplication::globalStrut
\brief the minimum size that any GUI element that the user can interact
with should have
+ \deprecated
For example, no button should be resized to be smaller than the global
strut size. The strut size should be considered when reimplementing GUI
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index 27e743a28d..6de72899f1 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -79,7 +79,9 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
#if QT_CONFIG(wheelevent)
Q_PROPERTY(int wheelScrollLines READ wheelScrollLines WRITE setWheelScrollLines)
#endif
+#if QT_DEPRECATED_SINCE(5, 15)
Q_PROPERTY(QSize globalStrut READ globalStrut WRITE setGlobalStrut)
+#endif
Q_PROPERTY(int startDragTime READ startDragTime WRITE setStartDragTime)
Q_PROPERTY(int startDragDistance READ startDragDistance WRITE setStartDragDistance)
#ifndef QT_NO_STYLE_STYLESHEET
@@ -158,8 +160,10 @@ public:
static void setWheelScrollLines(int);
static int wheelScrollLines();
#endif
+#if QT_DEPRECATED_SINCE(5, 15)
static void setGlobalStrut(const QSize &);
static QSize globalStrut();
+#endif
static void setStartDragTime(int ms);
static int startDragTime();