Freezing UI Revision 376637666264 (Tue Jan 12 2010 at 09:17) - Diff Link to this snippet: https://friendpaste.com/7Kyy4MtVgozjIYKjnDVnQf Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 123456789101112131415161718192021222324252627282930313233343536import sysfrom PySide.QtCore import *from PySide.QtGui import *from PySide.QtMaemo5 import *class FreezeDialog(QMainWindow): def __init__(self): QMainWindow.__init__(self) self.cw = QWidget(self) self.setCentralWidget(self.cw) self.vbox = QVBoxLayout(self.cw) self.dialog = Dialog(self) self.button = QPushButton(self) self.button.setText(QString("Open Dialog")) self.connect(self.button, SIGNAL("clicked()"), self.dialog.show) self.vbox.addWidget(self.button)class Dialog(QDialog): def __init__(self, parent): QDialog.__init__(self) self.vbox = QVBoxLayout(self) self.button = QPushButton(self) self.button.setText(QString("Close")) self.vbox.addWidget(self.button) self.connect(self.button, SIGNAL("clicked()"), self.hideDialog) def hideDialog(self): # These two ibox rows cause problems. Without them, everything works nicely. self.ibox = QMaemo5InformationBox() self.ibox.information(self, "This message will freeze the screen", 3000) self.hide()if __name__ == '__main__': app = QApplication(sys.argv) fd = FreezeDialog() fd.show() sys.exit(app.exec_())