Re: [PyQt] Shouldn't an item view keep a reference to its associatedmodel?

2007-07-21 Thread Florent Rougon
Hans-Peter Jansen <[EMAIL PROTECTED]> wrote: > and next time, you're facing empty widgets unexpectedly, it will ring a huge > bell somewhere between your ears.. ;-) Oh, yes. I guess this is a typical beginner's mistake. ;-) BTW: thank you very much for PyQt (and thanks to Qt developers if some

Re: [PyQt] Shouldn't an item view keep a reference to its associatedmodel?

2007-07-21 Thread Hans-Peter Jansen
Am Freitag, 20. Juli 2007 13:00 schrieb Florent Rougon: > Giovanni Bajo <[EMAIL PROTECTED]> wrote: > > It is not what Qt does. PyQt doesn't play tricks with object lifetimes: > > it exposes Qt's underlying object model. > > [...] > > OK, thanks to you and Phil for the answers. It makes sense now.

Re: [PyQt] Shouldn't an item view keep a reference to its associatedmodel?

2007-07-20 Thread Florent Rougon
Giovanni Bajo <[EMAIL PROTECTED]> wrote: > It is not what Qt does. PyQt doesn't play tricks with object lifetimes: it > exposes Qt's underlying object model. [...] OK, thanks to you and Phil for the answers. It makes sense now. Regards, -- Florent _

Re: [PyQt] Shouldn't an item view keep a reference to its associatedmodel?

2007-07-20 Thread Phil Thompson
On Friday 20 July 2007 11:17 am, Giovanni Bajo wrote: > On Fri, 20 Jul 2007 11:56:38 +0200, Florent Rougon <[EMAIL PROTECTED]> > > wrote: > > I thought it should be possible to have the views keep a reference to > > their model without "owning" it, as you say. For instance: > > > > view1.setModel

Re: [PyQt] Shouldn't an item view keep a reference to its associatedmodel?

2007-07-20 Thread Giovanni Bajo
On Fri, 20 Jul 2007 11:56:38 +0200, Florent Rougon <[EMAIL PROTECTED]> wrote: > I thought it should be possible to have the views keep a reference to > their model without "owning" it, as you say. For instance: > > view1.setModel(model) > > internally would do 'view1.model = model' > > and s