summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlinecontrol_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qlinecontrol_p.h')
-rw-r--r--src/gui/widgets/qlinecontrol_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h
index a81f138..f46abf1 100644
--- a/src/gui/widgets/qlinecontrol_p.h
+++ b/src/gui/widgets/qlinecontrol_p.h
@@ -109,6 +109,7 @@ public:
int width() const;
int height() const;
int ascent() const;
+ qreal naturalTextWidth() const;
void setSelection(int start, int length);
@@ -410,6 +411,11 @@ inline int QLineControl::width() const
return qRound(m_textLayout.lineAt(0).width()) + 1;
}
+inline qreal QLineControl::naturalTextWidth() const
+{
+ return m_textLayout.lineAt(0).naturalTextWidth();
+}
+
inline int QLineControl::height() const
{
return qRound(m_textLayout.lineAt(0).height()) + 1;