Skip to content

Commit

Permalink
Refs #10408 Tweak formatting of HintingLineEdit hints
Browse files Browse the repository at this point in the history
Hint keywords are shown in bold and descriptions are placed upon their
own line.
  • Loading branch information
Harry Jeffery committed Oct 24, 2014
1 parent d1029b7 commit 0dac5ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Code/Mantid/MantidQt/MantidWidgets/src/HintingLineEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ namespace MantidQt
{
QString hintList;
for(auto mIt = m_matches.begin(); mIt != m_matches.end(); ++mIt)
hintList += QString::fromStdString(mIt->first) + " : " + QString::fromStdString(mIt->second) + "\n";
{
hintList += "<b>" + QString::fromStdString(mIt->first) + "</b><br />\n";
if(!mIt->second.empty())
hintList += QString::fromStdString(mIt->second) + "<br />\n";
}

QToolTip::showText(mapToGlobal(QPoint(0, 5)), hintList.trimmed());
}
Expand Down

0 comments on commit 0dac5ef

Please sign in to comment.