Fix stylesheet hack to only be used with 4.6

Note: If you are compiling with 4.6 but running against 4.7 then this
will result in a slightly buggy line edit.
Reviewed-by: Friedemann Kleint <qtc-committer@nokia.com>
This commit is contained in:
dt
2010-02-16 14:02:37 +01:00
parent 3c99f02bcb
commit 2e870d3753

View File

@@ -166,8 +166,11 @@ void FancyLineEdit::updateStyleSheet(Side side)
if (m_d->m_showingHintText) if (m_d->m_showingHintText)
sheet += QLatin1String(" color: #BBBBBB;"); sheet += QLatin1String(" color: #BBBBBB;");
// Fix the stylesheet's clearing the size hint. // Fix the stylesheet's clearing the size hint.
#if QT_VERSION < 0x040700
sheet += QLatin1String(" height: "); sheet += QLatin1String(" height: ");
sheet += QString::number(sizeHint().height()); sheet += QString::number(sizeHint().height());
#endif
sheet += QLatin1Char('}'); sheet += QLatin1Char('}');
setStyleSheet(sheet); setStyleSheet(sheet);
} }