Ian
Ian

Reputation: 1716

'QTextEdit' object has no attribute 'setPlaceholderText'

I know that this question has been asked before, but there only PySide was referred as alternative. I kind of want it to work using PyQt4.

The problem is simple: I am using QtDesigner to create a .ui file. In the QtDesigner preview the PlaceholderText in my QTextEdit works just fine. In my python program however I get this error:

'QTextEdit' object has no attribute 'setPlaceholderText'

which is not true, at least according to the Qt Documentation. The feature was added in version 5.2 and I am using 5.6. PyQt4s version is 4.11.4 (up to date). My python version is 3.4. Any idea why it is not working?

Edit: I am open to alternatives involving using another object instead of QTextEdit, but I do not want to switch to PySide.

Upvotes: 0

Views: 1564

Answers (1)

ekhumoro
ekhumoro

Reputation: 120798

The PyQt4 you are using has not been built against Qt5, so it cannot access any of the features added in Qt5.

Upvotes: 2

Related Questions