diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-10-26 15:52:40 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-02-13 18:55:54 +0000 |
commit | 0b8160a26b8d1ebbb3ea74d697c77f91e6acc039 (patch) | |
tree | 72066488f80951feea9972d5dac1f1f57600ee09 /src/imports/templates | |
parent | 63899f3185b443ba3cdb7f34cf09f0ac01c5c037 (diff) |
Add Control::horizontal|verticalPadding
A common pattern for paddings:
padding: X
topPadding: Y
bottomPadding: Y
This pattern can be simplified by providing separate horizontalPadding
and verticalPadding properties:
padding: X
horizontalPadding: Y
The actual style changes will be applied separately. As a bonus, the
size of QQuickControlPrivate can be reduced a bit since we can move the
(has)top/left/right/bottomPadding members to ExtraData.
[ChangeLog][Controls][Control] Added horizontalPadding and verticalPadding
properties as a convenient way to set both left and right, or top and bottom
paddings in one go.
Change-Id: I3a93b6f9ab988d806b1f263e74b6bd6b5427fbbe
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/templates')
-rw-r--r-- | src/imports/templates/qtquicktemplates2plugin.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp index 877c997d..570aec0c 100644 --- a/src/imports/templates/qtquicktemplates2plugin.cpp +++ b/src/imports/templates/qtquicktemplates2plugin.cpp @@ -327,6 +327,7 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri) qmlRegisterType<QQuickSpinBox, 4>(uri, 2, 4, "SpinBox"); // QtQuick.Templates 2.5 (new types and revisions in Qt 5.12) + qmlRegisterType<QQuickControl, 5>(uri, 2, 5, "Control"); qmlRegisterType<QQuickToolTip, 5>(uri, 2, 5, "ToolTip"); } |