diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-04-05 19:53:01 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-04-10 14:16:05 +0000 |
commit | c2fd8f7d00e2a47724765e289b828c36c98da29c (patch) | |
tree | ee424a3cf41a0180996e8892339a62fc188a15da /src/quicktemplates2/qquickdialogbuttonbox_p_p.h | |
parent | fe7d1b895de1320499694579e6402bdc603f37d9 (diff) |
DialogButtonBox: add contentWidth and contentHeight
This is a follow-up to f1f884d3, which mentioned that:
This can be fixed properly in dev by providing separate contentWidth
and contentHeight properties that cleanly propagate the content size
to QML.
[ChangeLog][Controls][DialogButtonBox] Added contentWidth and
contentHeight properties.
Change-Id: I4b53702568c55d666bccb587af9fe8c8eba0b63d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickdialogbuttonbox_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquickdialogbuttonbox_p_p.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickdialogbuttonbox_p_p.h b/src/quicktemplates2/qquickdialogbuttonbox_p_p.h index 3c761d6b..b9cbe5b7 100644 --- a/src/quicktemplates2/qquickdialogbuttonbox_p_p.h +++ b/src/quicktemplates2/qquickdialogbuttonbox_p_p.h @@ -69,12 +69,25 @@ public: void itemImplicitHeightChanged(QQuickItem *item) override; void resizeContent() override; + void updateLayout(); + + qreal getContentWidth() const; + qreal getContentHeight() const; + + void updateContentWidth(); + void updateContentHeight(); + void updateContentSize(); + void handleClick(); QQuickAbstractButton *createStandardButton(QPlatformDialogHelper::StandardButton button); void removeStandardButtons(); + bool hasContentWidth; + bool hasContentHeight; + qreal contentWidth; + qreal contentHeight; Qt::Alignment alignment; QQuickDialogButtonBox::Position position; QPlatformDialogHelper::StandardButtons standardButtons; |