Commit adcf6a57 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: fixes painting bug

parent c66b5c18
......@@ -648,10 +648,10 @@ public:
protected:
void paintEvent(QPaintEvent *event)
{
QPainter p(this);
{
QFontMetrics fm(font());
if (fm.width(text()) > (contentsRect().width() - 6) && text().length() > 4) {
QPainter p(this);
QString elided_txt;
elided_txt = this->fontMetrics().elidedText(text(), Qt::ElideRight, rect().width() - 6, Qt::TextShowMnemonic);
p.drawText(rect().adjusted(12, 0, 0, 0), elided_txt);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment