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. -- Aaron J. Seigo signature.asc Description: This is a digitally signed message part.
Re: replacement for KDialog::[save|restore]DialogSize?
On Sonntag, 14. September 2014 19:16:35 CEST, Aaron J. Seigo wrote: 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. 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?
On Sunday, September 14, 2014 19.49:42 Thomas Lübking wrote: On Sonntag, 14. September 2014 19:16:35 CEST, Aaron J. Seigo wrote: 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. KWindowConfig::[save|restore]WindowSize, i'd say. 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 Dialog sized should also be maintained implicitly - see reviews 119594, 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. -- Aaron J. Seigo signature.asc Description: This is a digitally signed message part.
Re: replacement for KDialog::[save|restore]DialogSize?
On Sonntag, 14. September 2014 21:22:38 CEST, Aaron J. Seigo wrote: thanks. it's a little quirky: it doesn't work from the ctor of a QDialog subclass... You'll have to ensure that a) there's a QWindow (call QWidget::winId()) b) the eventloop is up (once the Qt bug is fixed - until then copying the size to the widget is mandatory) 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. Dialog sized should also be maintained implicitly - see reviews 119594, they definitely aren't at the moment; would be great if they would be. I was probably wrong on this - you're operating on top of a custom QDialog rather than some KDE derivate, are you? In that case it's probably not even reasonable to save/restore every random dialogs size (let alone to get the dialog a UID for the config key) Cheers, Thomas