Qt sends a signal to trigger the solution of the slot function twice

connect(&EnterPushButton,SIGNAL(clicked()),this, SLOT(on_CreateProject_clicked()));

Remarks:
1. EnterPushButton is the OK button
2. Be sure to write SIGNAL(Clicked() ), here is the signal
3. SLOT( on_CreateProject_clicked()) Be sure to write SLOT, and then the format of the following function must be written as
4.on_CreateProject_clicked() The format starts with on_ 2, plus the component name (custom name), 3, plus the operation _clicked().

Guess you like

Origin blog.csdn.net/weixin_44881103/article/details/114363307