[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] autoAdding buttons to a grid
From:       Richard Smith <smithbone () gmail ! com>
Date:       2005-05-17 15:46:58
Message-ID: 8a0c367805051708461923b107 () mail ! gmail ! com
[Download RAW message or body]

> >         bgMainLayout.activate()
> >
> > But the items never showup in my buttongroup.
> 
> Neither you or the QButtonGroup are keeping a reference to the QPushButton
> so it is getting garbage collected immediately. I need to check the Qt
> source to see if the QButtonGroup should keep a reference (in which case
> it's a PyQt bug) or you need to do it explicitly.

I thought about that but the docs say that in autoinsert mode the
parent of the items inserted is changed to ownership by the
buttongroup.  Or at least thats how I read it.  So I figured I didn't
need it.

I need a reference to those items anyway for easy access.  Guess just
blind luck I didn't add them to a list to start with.

I'll stick them in a list and see how it goes.

Thanks for the help. I'm glad I asked bc that would have probally
taken me a long time to figure out on my own with trial and error.

-- 
Richard A. Smith

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic