[Interest] QWidget + friends; How to restore properties across sessions?
markg85 at gmail.com
Mon Aug 18 15:14:02 CEST 2014
On Mon, Aug 18, 2014 at 3:11 PM, Adam Light <aclight at gmail.com> wrote:
> 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.
-- lets keep the list in it since this is quite neat information --
That sounds like a very nice possible solution! I think i'm going to
experiment with this a bit and see if works in my case.
More information about the Interest