From cd1ac8666c2b6c5085f4c07d9b67a75840fc962c Mon Sep 17 00:00:00 2001 From: David Skoland Date: Thu, 31 Mar 2022 14:55:13 +0200 Subject: Correct documentation in QMainWindow in regards to centralwidget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø Reviewed-by: Venugopal Shivashankar --- src/widgets/widgets/qmainwindow.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/widgets/widgets') 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() */ -- cgit v1.2.3