Skip to content

Commit

Permalink
python console setPlaceholderText qt < 4.7 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed May 15, 2013
1 parent 2566841 commit 8f363b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/console/console.py
Expand Up @@ -21,6 +21,7 @@

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4 import pyqtconfig
from qgis.utils import iface
from console_sci import ShellScintilla
from console_output import ShellOutputScintilla
Expand Down Expand Up @@ -466,7 +467,11 @@ def __init__(self, parent=None):
self.layoutFind.setContentsMargins(0, 0, 0, 0)
self.lineEditFind = QgsFilterLineEdit()
placeHolderTxt = QCoreApplication.translate("PythonConsole", "Enter text to find...")
self.lineEditFind.setPlaceholderText(placeHolderTxt)

if pyqtconfig.Configuration().qt_version >= 0x40700:
self.lineEditFind.setPlaceholderText(placeHolderTxt)
else:
self.lineEditFind.setToolTip(placeHolderTxt)
self.findNextButton = QToolButton()
self.findNextButton.setEnabled(False)
toolTipfindNext = QCoreApplication.translate("PythonConsole", "Find Next")
Expand Down

1 comment on commit 8f363b5

@slarosa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix Radim !

Please sign in to comment.