I am writing a SDI (Single Document Interface) application with the Qt framework.
I am currently stuck with a "small" problem: If I change a preference in one MainWindow, I would like that all the other instances of the same MainWindow to load that preference, say:
Window 2:
- User changes toolbar visibility (hides it).
- Settings are saved with using the QSettings feature.
All other windows (can be as many as the user wants):
- Detect that Window 2 saved the settings.
- Apply the new settings.
I have tried many things, such as using SIGNALS/SLOTS, but I cannot change all windows because the way that MainWindows are created in my app are so:
Window 1 creates Window 2:
Window 2 creates Window 3:
Window 3 creates Window 4:
- And so on...
This means that if a change a value in Window 3, only Window 2 will load the new settings.
Do you know a way of doing this (how pass values to all children (and parents) of a window)?