[Interest] QWidget + friends; How to restore properties across sessions?
aclight at gmail.com
Mon Aug 18 15:12:25 CEST 2014
[Resending to the list]
On Sat, Aug 16, 2014 at 11:12 AM, Mark Gaiser <markg85 at gmail.com> wrote:
> That is roughly the solution i'm looking for.
> But i'd like to go one step further. Do you know of some way - without
> editing the Qt source itself - to automatically pass each QWidget the
> gets constructed through the ConfigManager class? That would remove
> the need to add each GUI "manually" (in your case the Config UI main
> widget) in the ConfigManager.
I'm not aware of a way to do exactly what you requested, but you can get
pretty close if you reimplement QApplication::notify() and look for
the QEvent::ChildAdded event. That will allow you to set up property saving
on any child widgets, which should include all of the widgets you're
displaying to the user.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest