diff options
Diffstat (limited to 'src/quicktemplates2/qquickpage.cpp')
-rw-r--r-- | src/quicktemplates2/qquickpage.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/quicktemplates2/qquickpage.cpp b/src/quicktemplates2/qquickpage.cpp index dd9bcc21..56a9f86e 100644 --- a/src/quicktemplates2/qquickpage.cpp +++ b/src/quicktemplates2/qquickpage.cpp @@ -38,6 +38,7 @@ #include "qquickcontrol_p_p.h" #include "qquicktoolbar_p.h" #include "qquicktabbar_p.h" +#include "qquickdialogbuttonbox_p.h" #include <QtQuick/private/qquickitemchangelistener_p.h> @@ -189,8 +190,9 @@ void QQuickPage::setTitle(const QString &title) This property holds the page header item. The header item is positioned to the top, and resized to the width of the page. The default value is \c null. - \note Assigning a ToolBar or TabBar as a page header sets the respective - \l ToolBar::position or \l TabBar::position property automatically to \c Header. + \note Assigning a ToolBar, TabBar, or DialogButtonBox as a page header + automatically sets the respective \l ToolBar::position, \l TabBar::position, + or \l DialogButtonBox::position property to \c Header. \sa footer, ApplicationWindow::header */ @@ -223,6 +225,8 @@ void QQuickPage::setHeader(QQuickItem *header) toolBar->setPosition(QQuickToolBar::Header); else if (QQuickTabBar *tabBar = qobject_cast<QQuickTabBar *>(header)) tabBar->setPosition(QQuickTabBar::Header); + else if (QQuickDialogButtonBox *buttonBox = qobject_cast<QQuickDialogButtonBox *>(header)) + buttonBox->setPosition(QQuickDialogButtonBox::Header); } if (isComponentComplete()) d->relayout(); @@ -235,8 +239,9 @@ void QQuickPage::setHeader(QQuickItem *header) This property holds the page footer item. The footer item is positioned to the bottom, and resized to the width of the page. The default value is \c null. - \note Assigning a ToolBar or TabBar as a page footer sets the respective - \l ToolBar::position or \l TabBar::position property automatically to \c Footer. + \note Assigning a ToolBar, TabBar, or DialogButtonBox as a page footer + automatically sets the respective \l ToolBar::position, \l TabBar::position, + or \l DialogButtonBox::position property to \c Footer. \sa header, ApplicationWindow::footer */ @@ -269,6 +274,8 @@ void QQuickPage::setFooter(QQuickItem *footer) toolBar->setPosition(QQuickToolBar::Footer); else if (QQuickTabBar *tabBar = qobject_cast<QQuickTabBar *>(footer)) tabBar->setPosition(QQuickTabBar::Footer); + else if (QQuickDialogButtonBox *buttonBox = qobject_cast<QQuickDialogButtonBox *>(footer)) + buttonBox->setPosition(QQuickDialogButtonBox::Header); } if (isComponentComplete()) d->relayout(); |