PyQt Access Violations
Phil Thompson
phil at riverbankcomputing.co.uk
Sat Jan 7 09:08:13 EST 2006
On Saturday 07 January 2006 1:06 pm, gregarican wrote:
> I noticed that when I invoked the setCentralWidget() method using PyQt
> 3.13 on Python 2.3.5 opening and closing a widget associated with a
> main window would result in a Win32 access violation crash after a
> couple of times. Here's a generic snippet:
>
> class Application_Window(QMainWindow):
> def __init__(self):
> QMainWindow.__init__(self,None,'application main
> window',Qt.WDestructiveClose)
>
> def other_widget(self):
> self.this_widget=QWidget()
> self.setCentralWidget(self.this_widget)
>
>
> The only way I could avoid the crashes was to replace the
> setCentralWidget() method with:
>
> self.this_widget.show()
>
> Is there some fundamental error I was making in this, or is this a
> known bug?
What version of Qt?
Phil
More information about the Python-list
mailing list