Re: [PyQt] can't create a QPainter in QTreeWidget's paintEvent

2007-08-23 Thread Devon
On 8/23/07, David Boddie <[EMAIL PROTECTED]> wrote: > On Thu Aug 23 16:04:19 BST 2007, Devon wrote: > > > > If you pass a device (self in this case) when you create a QPainter, don't > > > call its begin() or end() methods. I think its the end() call that > > > actually triggers this message in thi

Re: [PyQt] can't create a QPainter in QTreeWidget's paintEvent

2007-08-23 Thread David Boddie
On Thu Aug 23 16:04:19 BST 2007, Devon wrote: > > If you pass a device (self in this case) when you create a QPainter, don't > > call its begin() or end() methods. I think its the end() call that > > actually triggers this message in this case. > > I'm not explicitly calling begin() - I believe t

Re: [PyQt] can't create a QPainter in QTreeWidget's paintEvent

2007-08-23 Thread Devon
> If you pass a device (self in this case) when you create a QPainter, don't > call its begin() or end() methods. I think its the end() call that actually > triggers this message in this case. I'm not explicitly calling begin() - I believe that's happening in QPainter(self). painter.end() is not

Re: [PyQt] can't create a QPainter in QTreeWidget's paintEvent

2007-08-23 Thread David Boddie
On Wed Aug 22 21:49:05 BST 2007, Devon wrote: > Here is a dummy version of a derived tree widget: [...] > def paintEvent(self, e): > QTreeWidget.paintEvent(self, e) > painter = QPainter(self) > painter.end() [...] > When an instance is added to a layout, I get the f

Re: [PyQt] can't create a QPainter in QTreeWidget's paintEvent

2007-08-23 Thread Devon
> > Here is a dummy version of a derived tree widget: > > > > > > class MyTreeWidget(QTreeWidget): > > def __init__(self, parent=None): > > QTreeWidget.__init__(self, parent) > > > > def paintEvent(self, e): > > QTreeWidget.paintEvent(self, e) >

Re: [PyQt] can't create a QPainter in QTreeWidget's paintEvent

2007-08-22 Thread Jim Bublitz
On Wednesday 22 August 2007 13:49, Devon wrote: > Hi, folks - > > Here is a dummy version of a derived tree widget: > > > class MyTreeWidget(QTreeWidget): > def __init__(self, parent=None): > QTreeWidget.__init__(self, parent) > > def paintEvent(self, e)

[PyQt] can't create a QPainter in QTreeWidget's paintEvent

2007-08-22 Thread Devon
Hi, folks - Here is a dummy version of a derived tree widget: class MyTreeWidget(QTreeWidget): def __init__(self, parent=None): QTreeWidget.__init__(self, parent) def paintEvent(self, e): QTreeWidget.paintEvent(self, e) painter = QPain