Is there a way to use QtDesigner "Edit Signals/Slots" GUI to "connect" between two class Objects / Widgets?
I like to pass text from one dialog to main window dialog.
Sort of upstream parent /child arrangement.
Is there a way to use QtDesigner "Edit Signals/Slots" GUI to "connect" between two class Objects / Widgets?
I like to pass text from one dialog to main window dialog.
Sort of upstream parent /child arrangement.
Using the Qt Designer GUI mechanism to create signal / slot connections is generally a bad idea because it results in code being generated by Qt's MOC (meta-object compiler) that gets hidden away inside the moc_*.cpp file. It's easy to forget these automatically created connect() statements, which can lead to all sorts of debugging problems later when you see slots being called twice (because you forgot about the auto connect and added another one in code), runtime errors (because you deleted the slot from your code but forgot to remove the connection from the UI file), or other behavior that leaves you scratching your head until you remember that auto connect.
So even if you do find a way to use the Designer GUI to make the connection, don't do it. Write it yourself, in C++, in the classes where you want to use it so it is in your face every time you edit the code. And add a comment so you remember why that signal, slot, and connect are there.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks