diff options
author | Kai Köhne <kai.koehne@qt.io> | 2024-05-02 17:31:54 +0200 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2024-05-06 13:15:47 +0200 |
commit | f85d3f950a046d768d7644931ed8167d614ad19c (patch) | |
tree | 326f39a98f0ce71883db32b30f12e46c501b8558 /src/quickwidgets/qquickwidget.cpp | |
parent | b85ec1cab47e8cdc5383fc0c681cee8a9f453366 (diff) |
Doc: Improve QQuickWidget constructor documentation
Pick-to: 6.7
Change-Id: I5fdf9918432c4861ca40158789e0b4e03674b240
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quickwidgets/qquickwidget.cpp')
-rw-r--r-- | src/quickwidgets/qquickwidget.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 0d119b1b49..c782dc74b1 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -628,9 +628,9 @@ QImage QQuickWidgetPrivate::grabFramebuffer() */ /*! - Constructs a QQuickWidget with the given \a parent. - The default value of \a parent is 0. + Constructs a QQuickWidget with a default QML engine as a child of \a parent. + The default value of \a parent is \c nullptr. */ QQuickWidget::QQuickWidget(QWidget *parent) : QWidget(*(new QQuickWidgetPrivate), parent, {}) @@ -639,10 +639,11 @@ QQuickWidget::QQuickWidget(QWidget *parent) } /*! - Constructs a QQuickWidget with the given QML \a source and \a parent. - The default value of \a parent is 0. + Constructs a QQuickWidget with a default QML engine and the given QML \a source + as a child of \a parent. -*/ + The default value of \a parent is \c nullptr. + */ QQuickWidget::QQuickWidget(const QUrl &source, QWidget *parent) : QQuickWidget(parent) { @@ -650,13 +651,11 @@ QQuickWidget::QQuickWidget(const QUrl &source, QWidget *parent) } /*! - Constructs a QQuickWidget with the given QML \a engine and \a parent. + Constructs a QQuickWidget with the given QML \a engine as a child of \a parent. - Note: In this case, the QQuickWidget does not own the given \a engine object; + \note The QQuickWidget does not take ownership of the given \a engine object; it is the caller's responsibility to destroy the engine. If the \a engine is deleted - before the view, status() will return QQuickWidget::Error. - - \sa Status, status(), errors() + before the view, \l status() will return \l QQuickWidget::Error. */ QQuickWidget::QQuickWidget(QQmlEngine* engine, QWidget *parent) : QWidget(*(new QQuickWidgetPrivate), parent, {}) |