summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorDavid Skoland <david.skoland@qt.io>2022-03-31 14:55:13 +0200
committerDavid Skoland <david.skoland@qt.io>2022-04-05 15:01:12 +0200
commitcd1ac8666c2b6c5085f4c07d9b67a75840fc962c (patch)
treef71517b6cde652a77947e5cd0fc2668bcdb2634f /src/widgets/widgets
parent306f44a176d82fba521e5072f2116fa17ea8c611 (diff)
Correct documentation in QMainWindow in regards to centralwidget
It's quite clear from the code in qmainwindow.cpp and qmainwindowlayout.cpp that centralWidget returns nullptr (not zero) if it's not set. This also seems to be perfectly well supported, contrary to the note given. Change-Id: Ib7ab37f3645089fb85d7262717b7147b5871c1ad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qmainwindow.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index cadb5a562f..49dec281c3 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -213,9 +213,6 @@ void QMainWindowPrivate::init()
\image mainwindowlayout.png
- \note Creating a main window without a central widget is not supported.
- You must have a central widget even if it is just a placeholder.
-
\section1 Creating Main Window Components
A central widget will typically be a standard Qt widget such
@@ -615,7 +612,7 @@ void QMainWindow::setStatusBar(QStatusBar *statusbar)
/*!
Returns the central widget for the main window. This function
- returns zero if the central widget has not been set.
+ returns \nullptr if the central widget has not been set.
\sa setCentralWidget()
*/