diff --git a/src/libs/utils/environmentmodel.cpp b/src/libs/utils/environmentmodel.cpp index 963994078ce..8992ad7e4b4 100644 --- a/src/libs/utils/environmentmodel.cpp +++ b/src/libs/utils/environmentmodel.cpp @@ -148,7 +148,14 @@ QVariant EnvironmentModel::data(const QModelIndex &index, int role) const if (pos >= 0) return d->m_items.at(pos).value; } - return d->m_resultEnvironment.value(d->m_resultEnvironment.constBegin() + index.row()); + QString value = d->m_resultEnvironment.value(d->m_resultEnvironment.constBegin() + index.row()); + if (role == Qt::ToolTipRole) { + // Use html to enable text wrapping + value = value.toHtmlEscaped(); + value.prepend(""); + value.append(""); + } + return value; } } if (role == Qt::FontRole) {