Support for older Qt versions which do not support "setPlaceholderText"

This commit is contained in:
Frank Zingsheim 2012-12-04 22:47:47 +01:00
parent aebdb3769f
commit 9784a426f4
1 changed files with 2 additions and 0 deletions

View File

@ -70,7 +70,9 @@ MainWindow::MainWindow() :
// "Filter" toolbar
mLineEditFilter = new QLineEdit(mUI.mToolBarFilter);
#if (QT_VERSION >= 0x407000) || defined(Q_WS_MAEMO_5)
mLineEditFilter->setPlaceholderText(tr("Quick Filter:"));
#endif
mUI.mToolBarFilter->addWidget(mLineEditFilter);
connect(mLineEditFilter, SIGNAL(textChanged(const QString&)), mFilterTimer, SLOT(start()));
connect(mLineEditFilter, SIGNAL(returnPressed()), this, SLOT(FilterResults()));