AttributeError: 'QComboBox' object has no attribute 'setPlaceholderText' How do I fix this?

AttributeError: 'QComboBox' object has no attribute 'setPlaceholderText' How do I fix this?

你是怎么做到的?因为我正在尝试 运行 一个 rcon 游戏工具。 这个命令“python3 isrt.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"))