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>
This commit is contained in:
David Skoland 2022-03-31 14:55:13 +02:00
parent 306f44a176
commit cd1ac8666c

View File

@ -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()
*/