Question

I have a QLineEdit, and I want to set a placeholder text. When I call setPlaceholderText(string) I get an AttributeError, but:

>>> from PyQt4 import QtCore
>>> QtCore.PYQT_VERSION_STR
'4.7.4'
>>> QtCore.QT_VERSION_STR
'4.7.0'

and from the QAssistant:

This property holds the line edit's placeholder text.
...
This property was introduced in Qt 4.7.

Was it helpful?

Solution

I would guess that although the libraries are very recent, the bindings are simply not that up to date.

You might want to check out PySide - a Nokia project with (IMO) fewer license issues than PyQt.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top