forked from qt-creator/qt-creator
QmakeProjectManager: Add tooltip to QtVersionItem
Shows the qmake path for now. Change-Id: Ic0fc400f122ee1670b16aec7db4f01d04ac8575d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -65,6 +65,8 @@ namespace Internal {
|
||||
|
||||
class QtVersionItem : public TreeItem
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(QtSupport::QtVersion)
|
||||
|
||||
public:
|
||||
explicit QtVersionItem(BaseQtVersion *version)
|
||||
: m_version(version)
|
||||
@@ -112,6 +114,14 @@ public:
|
||||
if (role == Qt::DecorationRole && column == 0)
|
||||
return m_icon;
|
||||
|
||||
if (role == Qt::ToolTipRole) {
|
||||
const QString row = "<tr><td>%1:</td><td>%2</td></tr>";
|
||||
return QString("<table>"
|
||||
+ row.arg(tr("Qt Version"), m_version->qtVersionString())
|
||||
+ row.arg(tr("Location of qmake)"), m_version->qmakeCommand().toUserOutput())
|
||||
+ "</table>");
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user