From e6c0595b2138929f5cb6199cde9c3d79d549e0ae Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 2 Jan 2017 12:35:35 +0100 Subject: 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 --- src/quick/items/qquicktext_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quick/items/qquicktext_p.h') 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); -- cgit v1.2.3