TextEditor: Allow explicitly passing the text format for tool tips

Change-Id: I6e592a73fa6a3229cda9e76a4ab33f2c0ca330c5
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-11-04 17:14:25 +01:00
parent 177f14b115
commit 8e4fb05532
6 changed files with 63 additions and 11 deletions

View File

@@ -60,6 +60,8 @@ private:
QVariant m_contextHelp;
};
using TextItem = std::pair<QString, Qt::TextFormat>;
class TextTip : public TipLabel
{
public:
@@ -76,6 +78,7 @@ public:
private:
QString m_text;
Qt::TextFormat m_format = Qt::AutoText;
};
class ColorTip : public TipLabel
@@ -117,3 +120,5 @@ private:
} // namespace Internal
} // namespace Utils
Q_DECLARE_METATYPE(Utils::Internal::TextItem)