diff options
-rw-r--r-- | src/quicktemplates2/qquickpage.cpp | 2 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_dialog.qml | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickpage.cpp b/src/quicktemplates2/qquickpage.cpp index a8c828f1..56034297 100644 --- a/src/quicktemplates2/qquickpage.cpp +++ b/src/quicktemplates2/qquickpage.cpp @@ -344,7 +344,7 @@ void QQuickPage::setFooter(QQuickItem *footer) if (d->footer) { QQuickItemPrivate::get(d->footer)->removeItemChangeListener(d, LayoutChanges); - footer->setParentItem(nullptr); + d->footer->setParentItem(nullptr); } d->footer = footer; if (footer) { diff --git a/tests/auto/controls/data/tst_dialog.qml b/tests/auto/controls/data/tst_dialog.qml index 22546083..1bfffc1d 100644 --- a/tests/auto/controls/data/tst_dialog.qml +++ b/tests/auto/controls/data/tst_dialog.qml @@ -67,6 +67,14 @@ TestCase { } Component { + id: qtbug71444 + Dialog { + header: null + footer: null + } + } + + Component { id: buttonBox DialogButtonBox { } } @@ -198,6 +206,11 @@ TestCase { compare(rejectedSpy.count, 1) } + function test_qtbug71444() { + var control = createTemporaryObject(qtbug71444, testCase) + verify(control) + } + function test_standardButtons() { var control = createTemporaryObject(dialog, testCase) |