From 0d5ce87e1aeaed361c8d034e8329c0ceca62e42a Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Fri, 14 Feb 2020 08:39:51 +0800 Subject: Remove confusing documentation QtWin::extendFrameIntoClientArea: You should set Qt::WA_NoSystemBackground for it to work QtWin::resetExtendedFrame: You must unset Qt::WA_NoSystemBackground for it to work Actual result: Set Qt::WA_NoSystemBackground and then call QtWin::extendFrameIntoClientArea results in a black window. So the documentation of QtWin::resetExtendedFrame is correct. Fixes: QTBUG-81831 Change-Id: I0fafb7049d65fa22eeb1b167a6227042f2fefe73 Reviewed-by: Friedemann Kleint --- src/winextras/qwinfunctions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/winextras/qwinfunctions.cpp b/src/winextras/qwinfunctions.cpp index b237a50..4dcf8f0 100644 --- a/src/winextras/qwinfunctions.cpp +++ b/src/winextras/qwinfunctions.cpp @@ -1664,8 +1664,8 @@ void qt_ExtendFrameIntoClientArea(QWindow *window, int left, int top, int right, If you want the extended frame to act like a standard window border, you should handle that yourself. - \note If \a window is a QWidget handle, set the - Qt::WA_NoSystemBackground attribute for your widget. + \note Qt::WA_NoSystemBackground must not be set on widgets for + extendFrameIntoClientArea() to work. \sa resetExtendedFrame() */ @@ -1709,7 +1709,7 @@ void QtWin::extendFrameIntoClientArea(QWindow *window, const QMargins &margins) This convenience function calls extendFrameIntoClientArea() with margins set to 0. - \note You must unset the Qt::WA_NoSystemBackground attribute for + \note Qt::WA_NoSystemBackground must not be set on widgets for extendFrameIntoClientArea() to work. \sa extendFrameIntoClientArea() -- cgit v1.2.3