[PyKDE] Segmentation fault with QTabBar/QTab

Phil Thompson phil at river-bank.demon.co.uk
Tue Jun 11 01:28:01 BST 2002

Kaercher, Joerg wrote:

> Hi,
> I am trying to use the QTabBar/QTab classes and get a segmentation fault
> when a tab is removed from the bar. I found a message in the PyKDE archive
> that mentions that on the C++ level QTabBar::removeTab() calls the
> destructor for the QTab object. Is it possible that the garbage collector in
> Python tries to do the same and thereby causes the segementation fault? Any
> ideas? (I am using PyQt 3.2.4 and Qt 3.0.4 under Linux)

Yes, that's exactly what's happening.

If you are happy to regenerate the C++ code then remove the 
/TransferBack/ from removeTab() in qtabbar.sip.

Otherwise change "mJ4" to "mJ0" on line 2917 of sipqtQTabBar.cpp.

Let me know if this solves the problem.


More information about the PyQt mailing list