Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python AttributeError:'QComboBox'对象没有属性'SetPlaceholder Text',如何修复此问题?_Python_Qcombobox - Fatal编程技术网

Python AttributeError:'QComboBox'对象没有属性'SetPlaceholder Text',如何修复此问题?

Python AttributeError:'QComboBox'对象没有属性'SetPlaceholder Text',如何修复此问题?,python,qcombobox,Python,Qcombobox,你是怎么做到的?因为我正在尝试运行一个rcon游戏工具。 python3isrt.py命令给出了 <16:43:10> "Cougarxr7": python3 isrt.py Traceback (most recent call last): File "isrt.py", line 3392, in <module> mgui = maingui() File "isrt.py", line

你是怎么做到的?因为我正在尝试运行一个rcon游戏工具。 python3isrt.py命令给出了

<16:43:10> "Cougarxr7": python3 isrt.py
Traceback (most recent call last):
  File "isrt.py", line 3392, in <module>
    mgui = maingui()
  File "isrt.py", line 252, in __init__
    self.gui.setupUi(self)
  File "/home/cougarxr7/Programs/isrt/ISRT_v0.8.1_Linux-Mac/ISRT_v0.8.1/bin/isrt_gui.py", line 1857, in setupUi
    self.retranslateUi(ISRT_Main_Window)
  File "/home/cougarxr7/Programs/isrt/ISRT_v0.8.1_Linux-Mac/ISRT_v0.8.1/bin/isrt_gui.py", line 1866, in retranslateUi
self.dropdown_select_server.setPlaceholderText(_translate("ISRT_Main_Window", "Select Server&quot)
AttributeError: 'QComboBox' object has no attribute 'setPlaceholderText'
如何修复此错误?
谢谢

QComboBox没有占位符文本选项,但您可以通过执行

self.dropdown_select_server.setEditable(True)
self.dropdown_select_server.lineEdit().setPlaceholderText(_translate("ISRT_Main_Window", "Select Server&quot"))

您从哪个版本的Qt导入QComboBox?感谢回复。请阅读下面的评论。感谢回复。我需要更好地解释我自己。我不是一个开发者,我是一个试图让这个程序在Ubuntu 20.04上运行的用户。这是程序支持票的链接,mines是24。如果你能读一下我在尝试让这个程序运行时遇到的问题。我已经包括了我所面临问题的屏幕截图。到目前为止,我无法为这个程序创建一个到python的符号链接。我没有安装Qt。此时,setPlaceholder错误就是我所面临的问题。这个问题已经解决了>需求已经满足:pyqt5 in/usr/lib/python3/dist packages 5.14.1