diff options
Diffstat (limited to 'src/controls/qquickcontrol.cpp')
-rw-r--r-- | src/controls/qquickcontrol.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/controls/qquickcontrol.cpp b/src/controls/qquickcontrol.cpp index 5415ff8e..1b41c352 100644 --- a/src/controls/qquickcontrol.cpp +++ b/src/controls/qquickcontrol.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE QQuickControlPrivate::QQuickControlPrivate() : hasTopPadding(false), hasLeftPadding(false), hasRightPadding(false), hasBottomPadding(false), - padding(0), topPadding(0), leftPadding(0), rightPadding(0), bottomPadding(0), + padding(0), topPadding(0), leftPadding(0), rightPadding(0), bottomPadding(0), spacing(0), layoutDirection(Qt::LeftToRight), background(Q_NULLPTR), contentItem(Q_NULLPTR) { } @@ -328,6 +328,31 @@ void QQuickControl::resetBottomPadding() } /*! + \qmlproperty real QtQuickControls2::Control::spacing + + This property holds the spacing. +*/ +qreal QQuickControl::spacing() const +{ + Q_D(const QQuickControl); + return d->spacing; +} + +void QQuickControl::setSpacing(qreal spacing) +{ + Q_D(QQuickControl); + if (!qFuzzyCompare(d->spacing, spacing)) { + d->spacing = spacing; + emit spacingChanged(); + } +} + +void QQuickControl::resetSpacing() +{ + setSpacing(0); +} + +/*! \qmlproperty enumeration QtQuickControls2::Control::layoutDirection This property holds the layout direction of the control. |