summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qframe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qframe.cpp')
-rw-r--r--src/widgets/widgets/qframe.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/widgets/widgets/qframe.cpp b/src/widgets/widgets/qframe.cpp
index 6f4310facb..1973fd24ee 100644
--- a/src/widgets/widgets/qframe.cpp
+++ b/src/widgets/widgets/qframe.cpp
@@ -32,7 +32,13 @@ QFramePrivate::~QFramePrivate()
inline void QFramePrivate::init()
{
+ Q_Q(QFrame);
setLayoutItemMargins(QStyle::SE_FrameLayoutItem);
+
+ // The frameRect property is implemented in terms of the widget's
+ // contentsRect, which conflicts with the implicit inclusion of
+ // the safe area margins in the contentsRect.
+ q->setAttribute(Qt::WA_ContentsMarginsRespectsSafeArea, false);
}
/*!
@@ -428,9 +434,9 @@ int QFrame::frameWidth() const
\brief the frame's rectangle
The frame's rectangle is the rectangle the frame is drawn in. By
- default, this is the entire widget. Setting the rectangle does
- does \e not cause a widget update. The frame rectangle is
- automatically adjusted when the widget changes size.
+ default, this is the entire widget. Setting the rectangle \e doesn't
+ cause a widget update. The frame rectangle is automatically adjusted
+ when the widget changes size.
If you set the rectangle to a null rectangle (for example,
QRect(0, 0, 0, 0)), then the resulting frame rectangle is