[PyKDE] Segmentation fault on exit

Thomas Gfüllner t.gfuellner at linux-ag.de
Wed Oct 11 10:50:52 BST 2000


Hi,

if I close the main widget I get a "Segmentation fault".
Do you know the reason for this?



import sys
from qt import *

class sub(QWidget):
    def __init__(self,parent = None,name = None,fl = 0):
        QWidget.__init__(self,parent,name,fl)

        self.resize(100,100)
        hbox = QHBoxLayout(self)

        self.new = QPushButton(self,'new')
        self.new.setText(self.tr('&Sub'))
        hbox.addWidget(self.new)

class users(QWidget):
    def __init__(self,parent = None,name = None,fl = 0):
        QWidget.__init__(self,parent,name,fl)

        self.resize(100,100)
        hbox = QHBoxLayout(self)

        self.new = QPushButton(self,'new')
        self.new.setText(self.tr('&New'))
        hbox.addWidget(self.new)


if __name__ == '__main__':
    a = QApplication(sys.argv)
    w = users()
    a.setMainWidget(w)
    w.show()
    sub = sub()
    sub.show()
    a.exec_loop()



-- 
  Thomas Gfüllner                    Software Engineer
  Linux Information Systems AG
  +49 (0)89 9934 12-25               t.gfuellner at linux-ag.de




More information about the PyQt mailing list