diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-04-06 13:47:16 +0300 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2016-07-28 23:42:56 +0000 |
commit | 695d85363e537b51b5d0ae6ab08a9a1e7d9e8354 (patch) | |
tree | 51f07befe3d10846a3b6bcfbf0cbf769e79ae1c2 /src/widgets/itemviews/qabstractitemdelegate_p.h | |
parent | 444ba31a0a68421ee9ff7de788f6026599202455 (diff) |
Item delegates: show localized detailed tooltips and "What's this?" texts
Extract the common part from QItemDelegate and QStyledItemDelegate
which uses QLocale to convert a value for Qt::DisplayRole to a string.
Use this code to get the text for tooltips and "What's this?".
[ChangeLog][QtWidgets][QAbstractItemDelegate] Show localized detailed
tooltips and "What's this?" texts.
Task-number: QTBUG-16469
Change-Id: I8618763d45b8cfddafc2f263d658ba256be60a15
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qabstractitemdelegate_p.h')
-rw-r--r-- | src/widgets/itemviews/qabstractitemdelegate_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qabstractitemdelegate_p.h b/src/widgets/itemviews/qabstractitemdelegate_p.h index 05f1bd138c..1796290ba9 100644 --- a/src/widgets/itemviews/qabstractitemdelegate_p.h +++ b/src/widgets/itemviews/qabstractitemdelegate_p.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE -class QAbstractItemDelegatePrivate : public QObjectPrivate +class Q_AUTOTEST_EXPORT QAbstractItemDelegatePrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QAbstractItemDelegate) public: @@ -60,6 +60,7 @@ public: bool editorEventFilter(QObject *object, QEvent *event); bool tryFixup(QWidget *editor); + QString textForRole(Qt::ItemDataRole role, const QVariant &value, const QLocale &locale, int precision = 6) const; void _q_commitDataAndCloseEditor(QWidget *editor); }; |