I am using qdarkstyle on my PyQt5 GUI, and I am trying to make a widget with internal combo boxes. The items in the combo box all have a square indicator to the left hand side that I want to hide.
I have tried setting the style sheet with no success
class Panel(QWidget):
def __init__(self, parent=None):
super().__init__(parent)
self.layout = QVBoxLayout()
self.cb = QComboBox()
self.cb.addItems([“hello”,”world”])
self.cb.setStyleSheet(self.getcbstylesheet())
self.layout.addWidget(self.cb)
self.setLayout(self.layout)
def getcbstylesheet(self):
return “””
QComboBox::indicator {
background-color: transparent;
selection-background-color: transparent;
color: transparent;
selection-color: transparent;
}
“””