Connecting signals and slots in .ui

I started playing around a bit with Qt 4. And then I ran into a problem with Qt Designer .
In the Signal / Slots editor, I can only configure the connections that are listed there, and not all slots are listed.

If I try to add it manually to the .ui file, the connection won't work.
If I add it to ui _ *. H, it works great, but then the connection is removed when the design changes.

Does anyone have any good advice on how I can get around this error? Or ask for another way:
How can I make Qt Designer list all available slots?

0


source to share


2 answers


Not all signals / slots are displayed by default. You can try checking the "Show signals and slots inherited from ...." checkbox in the lower left corner of the Configure Connection dialog box that appears when you try to create a signal.



Alternatively, you can either do what Marcin said and use autoconnections , or manually write the connection statements in the constructor of the object that uses the ui.

+2


source


You can try using the uic auto connect feature .



However, you won't be able to see all available slots, but if you use the same name in both constructors and in your code, they should be automatically connected.

0


source







All Articles