Whats up with KDialog?

Andreas Pakulat apaku at gmx.de
Wed Aug 1 17:54:09 BST 2007


On 01.08.07 17:39:05, Olivier Goffart wrote:
> Le mercredi 1 août 2007, Andreas Pakulat a écrit :
> > I'd like to know why KDialog differs so much from QDialog? Its currently
> > impossible to use KDialog with Qt Designer, even though it is included
> > in the custom widgets plugin.
> >
> > If one replaces QDialog with KDialog in the template for a dialog and
> > creates a dialog you'll get a form with ok+cancel button on the right in
> > the vertical middle. You can't set a layout on the dialog and you also
> > can't properly add any widgets to it. This seems wrong, or it is
> > actually wanted and the example in the KDialog apidox is the only way to
> > use it (i.e. using its setMainWidget function. If the latter is the case
> > IMHO it shouldn't be part of the custom widget plugin and it shouldn't
> > be possible to use it as base class for a form.
> >
> > In the case that KDialog is not supposed to be subclassed like and used
> > as direct replacement of QDialog, the krazy check for s/QFoo/KFoo should
> > also be changed to not require to use KDialog when QDialog is used in
> > sources. IMHO.
> 
> No, KDialog is not 100% source compatible with QDialog. 
> So no, you can't simply do s/QDialog/KDialog/ 
> But still, we should use KDialog instead of QDialog, since it's more 
> respectfull of KDE standards 
> 
> Indeed you cannot add a layout directly to the KDialog since it has already 
> his own layout. You must make use of the mainWidget()

Ok, agreed. 

> Regarding designer integration, it seems to be completely wrong and broken.
> You are right, it should not be a part of the custom widget plugins. I don't 
> know if it's possible to integrate it with designer.

I don't think its possible either, at least I can't see without having a
separate proxy-widget inside designer sources for that (like for
QMainWindow)

Andreas

-- 
Celebrate Hannibal Day this year.  Take an elephant to lunch.




More information about the kde-core-devel mailing list