Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Stacked widget signals and slots
rafael last edited by
i have a stacked widget on my main window it contains 2 custom widgets
those custom widgets have a stacked widget and 2 custom widgets also.
what is the easiest way to pass a variable from the inner most custom widget to my main window.
i am able to pass data but i am having to chain connect signals and slots.
could somebody show me an example on how to connect the signal directly to a slot in my mainwindow.
You're using the correct strategy currently. Keep things encapsulated, If you try to make "direct" connection between low level widgets with the top, you are going to create tight coupling which is going to be a nightmare to maintain.