[英]PyQt4: AttributeError: 'QLineEdit' object has no attribute 'setPlaceholderText'
I have a QLineEdit, and I want to set a placeholder text. 我有一个QLineEdit,我想设置一个占位符文本。 When I call
setPlaceholderText(string)
I get an AttributeError, but: 当我调用
setPlaceholderText(string)
出现AttributeError,但是:
>>> from PyQt4 import QtCore
>>> QtCore.PYQT_VERSION_STR
'4.7.4'
>>> QtCore.QT_VERSION_STR
'4.7.0'
and from the QAssistant: 从QAssistant:
This property holds the line edit's placeholder text.
此属性保存行编辑的占位符文本。
......
This property was introduced in Qt 4.7.此属性在Qt 4.7中引入。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.