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               [EMAIL PROTECTED]

_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde

Reply via email to