On Sat, May 8, 2010 at 11:18 PM, Edwin Marshall <[email protected]> wrote:
> I would open a bug report, but the last time I did so it was closed as > invalid. This could very well be user-error as well... > > The following code segfaults with no traceback when using PySide, but not > PyQt4: http://pastie.org/951828 > > ____________________________________________________________ > GET FREE 5GB EMAIL - Check out spam free email with many cool features! > Visit http://www.inbox.com/email to find out more! > _______________________________________________ > PySide mailing list > [email protected] > http://lists.openbossa.org/listinfo/pyside > Your code with only minimal changes works for me: import sys from PySide.QtGui import (QApplication, QLabel, QPushButton, QMainWindow, QVBoxLayout, QWidget) from PySide.QtCore import (Qt, SIGNAL) class WelcomeWindow(QMainWindow): def __init__(self): QMainWindow.__init__(self) self.setAttribute(Qt.WA_Maemo5StackedWindow) self.addWidgets() self.exercise_window = ExerciseWindow(self) self.exercise_window.hide() self.connect(self.button, SIGNAL("clicked()"), self.exercise_window.show) def addWidgets(self): self.cw = QWidget(self) self.setCentralWidget(self.cw) self.vbox = QVBoxLayout(self.cw) self.button = QPushButton("Push Me", self) self.vbox.addWidget(self.button) class ExerciseWindow(QMainWindow): def __init__(self, parent): QMainWindow.__init__(self,parent) self.setAttribute(Qt.WA_Maemo5StackedWindow) self.addWidgets() def addWidgets(self): self.label = QLabel("Second Window", self) self.setCentralWidget(self.label) if __name__ == '__main__': app = QApplication(sys.argv) welcome_window = WelcomeWindow() welcome_window.show() sys.exit(app.exec_()) -- Luca Donaggio
_______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
