DevHeads.net

replacement for KDialog::[save|restore]DialogSize?

hi..

what is the new idiom for KDialog::[save|restore]DialogSize when moving to
QDialog?

i couldn't find anything in the porting notes or in the porting scripts.

Comments

Re: replacement for KDialog::[save|restore]DialogSize?

By =?utf-8?Q?Thoma... at 09/14/2014 - 12:49

On Sonntag, 14. September 2014 19:16:35 CEST, Aaron J. Seigo wrote:
KWindowConfig::[save|restore]WindowSize, i'd say.
Dialog sized should also be maintained implicitly - see reviews 119594, 119593, 120078 and Qt bug 40584 for (partial still present) caveats in that system.

Cheers,
Thomas

Re: replacement for KDialog::[save|restore]DialogSize?

By Aaron J. Seigo at 09/14/2014 - 14:22

On Sunday, September 14, 2014 19.49:42 Thomas Lübking wrote:
thanks. it's a little quirky: it doesn't work from the ctor of a QDialog
subclass... but the window in questions already had a delayed init sequence so
no big deal

they definitely aren't at the moment; would be great if they would be.
hopefully i can get rid of that code when this is actually working as
intended.

Re: replacement for KDialog::[save|restore]DialogSize?

By =?utf-8?Q?Thoma... at 09/14/2014 - 15:50

Both is usually the case for a delayed init, but not on "normal" construction.

Since we might want to re-add customStyleHint(.) etc. convenience functions to a KWidgetsAddons namespace, one could certainly add a thin KWidgetsAddons::[save|restore]WindowSize(QWidget*, .) that ensures the winId() part and works around the Qt bug until that gets fixed - the eventloop would remain to be ensured in KWindowConfig directly.

Cheers,
Thomas