diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-08-08 08:18:13 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-08-08 12:49:44 +0200 |
commit | 2329a3145e59c16b5bbc37cedad7e67e16f14fb8 (patch) | |
tree | 73900588daab4c2c91ef0ff6566818905375ca85 /src/quick/items/qquicktextedit.cpp | |
parent | d0eb6f9e07156880c6d9de4b98b2e4abfc4a0bfb (diff) | |
parent | 432e27ae092397cb2154f48103e729852c38cf2d (diff) |
Merge remote-tracking branch 'origin/dev' into wip/pointerhandler
Change-Id: I0af7b0c3e0a21aae68c82ec11c5ca579c1661ce9
Diffstat (limited to 'src/quick/items/qquicktextedit.cpp')
-rw-r--r-- | src/quick/items/qquicktextedit.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 61d610520f..f22c5f00be 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -356,6 +356,19 @@ QString QQuickTextEdit::text() const */ /*! + \qmlproperty bool QtQuick::TextEdit::font.kerning + \since 5.10 + + Enables or disables the kerning OpenType feature when shaping the text. This may improve performance + when creating or changing the text, at the expense of some cosmetic features. The default value + is true. + + \qml + TextEdit { text: "OATS FLAVOUR WAY"; kerning: font.false } + \endqml +*/ + +/*! \qmlproperty string QtQuick::TextEdit::text The text to display. If the text format is AutoText the text edit will @@ -3038,6 +3051,32 @@ void QQuickTextEdit::resetBottomPadding() } /*! + \qmlproperty real QtQuick::TextEdit::tabStopDistance + \since 5.10 + + The default distance, in device units, between tab stops. + + \sa QTextOption::setTabStop() +*/ +int QQuickTextEdit::tabStopDistance() const +{ + Q_D(const QQuickTextEdit); + return d->document->defaultTextOption().tabStop(); +} + +void QQuickTextEdit::setTabStopDistance(qreal distance) +{ + Q_D(QQuickTextEdit); + QTextOption textOptions = d->document->defaultTextOption(); + if (textOptions.tabStop() == distance) + return; + + textOptions.setTabStop(distance); + d->document->setDefaultTextOption(textOptions); + emit tabStopDistanceChanged(distance); +} + +/*! \qmlmethod QtQuick::TextEdit::clear() \since 5.7 |