[PyKDE] Segault > Bug in pyQT? (Or stupid me?) > solved

Phil Thompson phil at riverbankcomputing.co.uk
Mon Jan 23 17:05:11 GMT 2006


On Friday 20 January 2006 8:56 am, Michael Zimmermann wrote:
> Phil Thompson wrote:
> > No, sorry, there aren't enough clues in the backtrace to suggest a
> > particular problem. You need to simplify your code to narrow it down.
>
> Hi Phil,
>
> it took me a while to reduce the problem down to something manageable
> (see attached file).
>
> What I found out is the folllowing:
> - If I create a QDockWindow but do not dock it into one of the dock
> areas but leave it floating the application quits without segfault.
> - If the QDockWinwow is docked into a dockarea (either by the user or in
> __init__) the application segfaults
> - If I manually delete the QDockWindow instance in closeEvent, the
> application quits without segfault.
>
> So, the problem seems to be that the application segfaults with the
> segfault posted if a DockWindow was / is docked into one of the
> dockarea. Deleting the instance of the QDockWindow seems to solve the
> problem for me.
>
> Just thought I let you know. Don't know if this is something pyQt should
>   handle or not :-)

I would suggest making the QDockWindow a child of the QMainWindow, ie...

    partsDock = QDockWindow(self)

Phil




More information about the PyQt mailing list