I have a graphical application written in C++ using Qt for an embedded device, which uses a QStackedWidget
holding a number of UI widgets. The UI is all designed in Qt Creator's designer tool. When the user navigates through the device's application the display to be shown at that menu option is selected from the QStackedWidget
and this all works great.
I'm now wanting to pass in a pointer to some configuration which is read from file when the application starts, but I can't seem to find a way to pass this pointer as an argument into the constructor of a widget on the QStackedWidget
. Can anyone help?
My current approach is to call a function I've written within the class of a widget on the QStackedWidget
, which works but doesn't feel the best way to do it.