[PyKDE] SegFault at exit using QStatusBar

Noah Spies spies at ice.mpg.de
Thu Apr 18 13:56:23 BST 2002


Hi,
I've been attempting to use QStatusBar in my application, and it seems
to work just fine, until I quit the application, at which point it
seg-faults.  Everything else apparently runs perfectly well, and I can
see the message in the statusbar.

Did I do something wrong?  I'm using PyQt/SIP 3.1 and Qt 3.0.3.  The
code that crashes is included below.

Noah



#!/usr/bin/env python

import sys
from qt import *

class MainWindow(QWidget):
    def __init__(self, *args):
        apply(QWidget.__init__, (self,) + args)
        
        self.status_bar = QStatusBar(self)
        self.status_bar.message("HI!")
        
def run_main(alignment=None):
    application = QApplication(sys.argv)
    
    main_window = MainWindow()
    main_window.show()
    
    application.connect(application, SIGNAL('lastWindowClosed()'),
                        application, SLOT('quit()'))
    application.exec_loop()

if __name__ == "__main__":
    run_main()





More information about the PyQt mailing list