diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2017-01-02 12:35:35 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2017-05-19 07:45:30 +0000 |
commit | e6c0595b2138929f5cb6199cde9c3d79d549e0ae (patch) | |
tree | b135f8c9b02a1ccecb016b9bceda32df6214e487 /src/quick/items/qquicktext_p.h | |
parent | 4425d6f9b637e7404379b611cef4b22929acbe62 (diff) |
Add advance property to QQuickText
This is a step on the way to certain optimization possibilities
for text in Qt Quick. Basically, to allow users the ability to
split text into separate items (so that you can distinguish
dynamic from static, and unshaped from shaped text), we also
need a way to string those items together visually later. The
advance property is required for this.
[ChangeLog][QtQuick][Text] Added "advance" property to Text element.
Task-number: QTBUG-56728
Change-Id: I8e7bf9bac410fa9c5553b48db90956431a2873f6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/items/qquicktext_p.h')
-rw-r--r-- | src/quick/items/qquicktext_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h index b190738cfb..a56bcdb87b 100644 --- a/src/quick/items/qquicktext_p.h +++ b/src/quick/items/qquicktext_p.h @@ -99,6 +99,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickText : public QQuickImplicitSizeItem Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged REVISION 6) Q_PROPERTY(QJSValue fontInfo READ fontInfo NOTIFY fontInfoChanged REVISION 9) + Q_PROPERTY(QSizeF advance READ advance NOTIFY contentSizeChanged REVISION 10) public: QQuickText(QQuickItem *parent=0); @@ -251,6 +252,7 @@ public: void resetBottomPadding(); QJSValue fontInfo() const; + QSizeF advance() const; Q_SIGNALS: void textChanged(const QString &text); |