[PyKDE] Segmentation fault with QToolBar

Boudewijn Rempt boud at valdyas.org
Mon Jun 3 19:02:01 BST 2002


On Monday 03 June 2002 12:48, Janos Blazi wrote:
> My program is short:
>
>    import sys
>    from qt import *
>
>    app=QApplication(sys.argv)
>    app.connect(app, SIGNAL("lastWindowClosed()"),app,SLOT("quit()"))
>
>    mw = QMainWindow()
>    tb = QToolBar(mw) #(***)
>
>    mw.show()
>    app.exec_loop()
>
> Everything is displayed correctly but after terminating the program I
> get a segmentation fault. If I omit the line (***), no segmentation
> fault occures.
> (I had that in a much larger program and it took some time to find the
> culprit.)

Hmmm... It must be some version/lib/platform issue, because, with the
latest PyQt, Python 2.2 on SuSE 7.3, no segfault occurs. So you've got
a bug here in PyQt, which may or may not be solved in the latest version
for your platform.

> I have LOOKED INTO THE DOCUMENTATION too.
>

Ouch. My poor ears. All in tatters. But seriously, having looked in the 
documentation is not really something that people do, as a rule. I mean,
I've had lots of questions that could have been solved by looking around
a bit.

> Can anybody give me a hint as to what happens here?
>

Try upgrading.

-- 
Boudewijn Rempt | http://www.valdyas.org




More information about the PyQt mailing list