Probably, but it is easier just to open the .ui file in a text editor and examine the connections part of the XML (usually near the end of the file). Or run the program in debug mode and print out the identity of the sender in each of the slots. If the sender is the same in both slots when you click on the pushbutton in the settings dialog, then somehow you managed to connect the wrong button to one of them.
It is a
really, really good practice to name your UI controls something sensible and meaningful, rather than meaningless names like "pushbutton_3" at Qt Designer does by default. You can easily rename the widgets in the designer - just click on the name in the properties and change it. When you end up with multiple dialogs, and all of the pushbuttons are named "1", "2", "3", ... it is easy to get yourself confused, and impossible to remember when looking at the code what "pushbutton_1" does in
this dialog vs. what the button with the same name does in a completely different dialog.
The problems you are having are the main reason I said I prefer to set up my connections in code, rather than use the designer to do it. It may be easier to use the designer, but after you are done, there is no way to look at your C++ code and tell at a glance what's going on. You have to look in several places to figure it out, and changing it leads to more places to mess up. When you do it in code in the dialog constructor, it's dead simple and obvious what is going on:
connect( ui->showSettingsBtn, SIGNAL( clicked() ), this, SLOT( onShowSettings() ) );
connect( ui->showSettingsBtn, SIGNAL( clicked() ), this, SLOT( onShowSettings() ) );
To copy to clipboard, switch view to plain text mode
The button is named something sensible, easy to remember, and obvious what happens when it is clicked, and the slot is named similarly.
Bookmarks