PyQt---Complete the signal and slot settings in QtDesigner

Event=signal
event function=signal slot

A signal can be bound to multiple slots, and a slot can intercept multiple signals.

One of the more convenient points in QtDesigner is that you can quickly complete some basic signal and slot settings through Edit.

1.
Insert picture description here
Deploy the controls first: 2. Edit—Edit signal/slot
Left-click to drag the signal sending ground to the signal receiving ground.
Insert picture description here
3. Run
Insert picture description here

	 self.pushButton.clicked.connect(MainWindow.close) 
     self.checkBox.toggled['bool'].connect(self.lineEdit.setVisible)      
     self.checkBox_2.toggled['bool'].connect(self.textEdit.setEnabled)
 

Guess you like

Origin blog.csdn.net/Forest_2Cat/article/details/105630560