我有一个窗口,其中有单选按钮,更改其中一个后,我想单击按钮并更改所有窗口。不在新窗口中
我找不到答案。
# ...
self.setWindowTitle("Test Your Math...")
r1 = QRadioButton("addition")
r2 = QRadioButton("extraction")
r3 = QRadioButton("multiplication")
r4 = QRadioButton("division")
h_box = QHBoxLayout()
h_box.addWidget(r1)
h_box.addWidget(r2)
h_box.addWidget(r3)
h_box.addWidget(r4)
v_box = QVBoxLayout()
v_box.addWidget(self.label_text)
v_box.addStretch()
v_box.addLayout(h_box)
self.setLayout(v_box)
v_box.addWidget(self.a)
changebutton = QPushButton()
changebutton.setIcon(QIcon("blabla"))
changebutton.setIconSize(QSize(65,65))
v_box.addWidget(changebutton)
答案 0 :(得分:0)
New-ScheduledTask
然后,当您单击def some_function(*args, **kwargs):
change_entire_window()
button = QPushButton("Click me!")
button.clicked.connect(some_function)
时,它将触发some_function