QtCreator
-
In QtCreator, in the Design view (when I open Forms like mainwindow.ui)
How to view, edit, delete all the connections that I've made in the graphical Design tool?
E.g. I created connections in Design by selecting a button, clicking "Go to slot..." and then "clicked()". I know I can browse mainwindow.hpp/cpp and see the functions created, but is there easier way to list all the connections?
-
Yes - select a widget, click on "Signals and slots editor" tab at the bottom of the screen:
-
Yes - select a widget, click on "Signals and slots editor" tab at the bottom of the screen:
That's what I thought, but Action editor as well as Signals and Slots editor are always displaying empty, even if I select in editor the widget that has assigned slots like on click etc.
EDIT:
Only way to show something in that tabs, is to go into mode of Edit Signals/Slot (F5) and then connect one GUI widget to another GUI widget and then select a signal and a slot - then I see that connection in the tab at bottom.
But I want instead to see (also) connection that is created when I connect slot of widget to a c++ function in code - as done when I select widget and click "Go to slot...".
Qt Creator4.8.2 based on Qt 5.11.3, Debian 10.
-
Sounds like a bug.
-
Hm, now that I check it deeper, I think this is not for automatic "go to slot" connections, but for more manual connections you can add with that big fat "+" button.
So, no bug and it also means there is no easy way to look up all those "go to slot" connections. Which is probably good, actually, as that option should IMO be removed from Qt and from Creator. It's much better and safer to use explicit connections, using new syntax.
-
So, no bug and it also means there is no easy way to look up all those "go to slot" connections. Which is probably good, actually, as that option should IMO be removed from Qt and from Creator. It's much better and safer to use explicit connections, using new syntax.
Current form is already not fully comfortable.
The thing that would speed up developer's workflow at least for me, would be so that I select a widget and I see list of what it connects to (at least to Ui creator knowledge).
I want to look - "oh.. this button" and quickly see what actions it executes and jump to them, now I click Go to slot... which is 2 clicks, and requires me to remember which slot I used (e.g. OnClick / Select / Activate / ....) and even then I do not see a list of existing slots.
Certainly such option would help me a lot to organise what controls do what, in the nice graphical way.
-
Yes, I see what you mean. There is a graphical view of signals and slots but it works only for connections between UI elements. Tap F4 to get to it.
But what you wrote is a great suggestion, please if you have some time report it on Qt bugtracker as a feature request!