KConfigDialogManager support for QButtonGroup does not work

Albert Astals Cid aacid at kde.org
Tue Sep 23 09:56:06 BST 2008


----- Mensaje original -----
>
> On Sep 22, 2008, at 6:28 PM, Albert Astals Cid wrote:
>
> > A Dilluns 22 Setembre 2008, Benjamin Meyer va escriure:
> > > On Sep 22, 2008, at 4:46 AM, Albert Astals Cid wrote:
> > > > ----- Mensaje original -----
> > > >
> > > > > On Sep 21, 2008, at 5:48 PM, Albert Astals Cid wrote:
> > > > > > * Try to support QButtonGroup, that means tracking QObjects and
> > > > > > finding a way
> > > > > > to "find" the QButtonGroup. Tracking QObjects needs the API to
> > > > > > change (bad)
> > > > > > and as QButtonGroup can have no parent, find it is not trivial
> > > > > > either (bad)
> > > > >
> > > > > QButtonGroup ( QObject * parent = 0 ) is a public function last I
> > > > > checked.
> > > >
> > > > Exactly what i'm saying, if i can create a QButtonGroup without a
> > > > parent how am i supposed to find it?
> > > >
> > > > Albert
> > >
> > > By calling setParent on your buttongroup?  KConfigDialogManager works
> > > only on the tree of objects.  If QButtonGroup doesn't have a parent 
> > > it
> > > is probably leaking memory anyway when you delete the dialog.
> >
> > To me having a QButtonGroup as member of a class seems completely 
> > correct,
> > there's no need to have a parent, so it's potentially unfindable. In 
> > my
> > opinion more than enough to remove the broken support we have, after 
> > all this
> > is KDE, so asking to use KButtonGroup is not a problem if you want 
> > to have a
> > KConfigDialogManager.
> >
> > Unless you offer a better solution.
>
> So if I have a QCheckBox as a member how do you propose that 
> KConfigDialogManager find it?

Having a QCheckBox as member is Ok, but if you don't set the parent you are not going to get correct rendering, right?

On the other hand, a QGroupButton as member and no parent is totally Ok.

Albert - date wrong by virtue of the n810

>
> -Benjamin Meyer





More information about the kde-core-devel mailing list