[英]PyQt5 5.8.2 QLineEdit has no attribute 'setPlaceHolderText'
I'm trying figure out whats wrong with my PyQt5 install, I've looked at all the documentation and I should be able to use placeHolderText
and setPlaceHolderText()
but it doesn't look like it does. 我正在尝试找出我的PyQt5安装有什么问题,已经查看了所有文档,并且我应该能够使用placeHolderText
和setPlaceHolderText()
但看起来不一样。 The QtWidgets.QLineEdit()
works and shows up on my gui but can get it to setPlaceHolderText
. QtWidgets.QLineEdit()
可以在我的gui上显示并显示出来,但可以将其添加到setPlaceHolderText
。 Also QLayout.setFixedSize
also returns the same error. 而且QLayout.setFixedSize
也返回相同的错误。 Importing PyQt5 doesn't return any errors so these should work too. 导入PyQt5不会返回任何错误,因此这些错误也应该起作用。
I installed PyQt5 through pip3 on python 3.5.2, has anyone had this issue before, I'm not sure what I've done wrong. 我在python 3.5.2上通过pip3安装了PyQt5,以前有人遇到过此问题,但我不确定自己做错了什么。
所以,嗯……很尴尬, setPlaceHolderText()
假定为小写h -> setPlaceholderText()
和QLayout.setFixedSize
假定为大写S -> SetFixedSize()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.