use try instead of version sting checking

This commit is contained in:
Andreas Preikschat 2012-03-24 12:26:37 +01:00
parent 8dca5b4647
commit 384d61b302
1 changed files with 5 additions and 4 deletions

View File

@ -64,11 +64,12 @@ class SearchEdit(QtGui.QLineEdit):
)
self._updateStyleSheet()
self.setAcceptDrops(False)
#if Qt.PYQT_VERSION_STR >= u'4.9.1' and Qt.qVersion() >= u'4.7':
if True:
print u'pyqt:', Qt.PYQT_VERSION_STR
print u'qt:', Qt.qVersion()
# setPlaceholderText has been implemented in Qt 4.7 and in at least
# PyQt 4.9 (I am not sure, if it was implemented in PyQt 4.8).
try:
self.setPlaceholderText(translate('OpenLP.searchedit', 'Search...'))
except AttributeError:
pass
def _updateStyleSheet(self):
"""