I am just wondering how to add cascading menu by QCheckBOx in Pyqt so that for every selection, I can unfold, and get more options. This is my code below,
class Example (QWidget):
def __init__(self, fname):
self.fname=fname
super().__init__()
self.initUI()
def initUI(self):
self.sheets= list(fname.keys())
print(self.sheets)
self.cb1 = QCheckBox("Hello", self)
self.cb2 = QCheckBox("You", self)
self.cb3 = QCheckBox("Are", self)
self.cb4 = QCheckBox("My", self)
self.cb5 = QCheckBox("Sunshine", self)
self.resize(300,400)
self.setWindowTitle('QCheckBox')
formLayout = QFormLayout()
groupBox = QGroupBox("This Is Group Box")
formLayout.addRow(self.cb1)
formLayout.addRow(self.cb2)
formLayout.addRow(self.cb3)
formLayout.addRow(self.cb4)
formLayout.addRow(self.cb5)
So I have 5 select boxes,
But now for every box I want to add the cascading menu, just like the pic shows below