Re: [PyQt] PyQt application crashes on exit
Well.. i cannot say if this is a Windows 7 issue... but seens to be. the same application hangs on Windows 7... but doesn´t hang in a windows xp sp3 i using PyQt 4.7.2 and Python 2.6.5 and Qt 4.6.2 in both systems windows 7 report an application crash seconds after its closed. If i start the application through Eclipse, after exits the python process keep in memory until forced to finish trying to get through this too. Tobias On 8 April 2010 14:49, Alexander Serdyukov wrote: > Hi, > > After I've installed PyQt 4.7.2 many of the samples I work with will > repeatedly crash on exit. > > This would be the simplest example to reproduce this problem. > > import sys > from PyQt4.QtGui import * > app = QApplication(sys.argv) > tree = QTreeWidget() > item = QTreeWidgetItem(tree, ["item 1"]) > tree.show() > app.exec_() > > I tried to download the latest snapshot > (PyQt-win-gpl-snapshot-4.7.3-22b0acdb1b62.zip), but the problem is > still here. > This is what I have on my machine now: > Windows 7 Professional 64-bit > Python 3.1.2.3 (installed from ActivePython's msi package) > Qt 4.6.2 installed from qt-sdk-win-opensource-2010.02.1.exe and built > with Visual Studio 2005 > PyQt build from PyQt-win-gpl-snapshot-4.7.3-22b0acdb1b62.zip sources > > Am I doing something wrong? > > Thanks, > Alex > ___ > PyQt mailing listPyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Closing MDI App hangs
hi all.. i have a MDI form who is the first in the aplication, when it loads he calls for login or other functions.. i´ve olverloaded closeevent calling a QMessagebox, but the aplication doesnt really close.. i can see in taskmanager a python aplication running. the mainwindow has no parent and all other windows is child of this one. So. What is the best way to close an application? or initiate an application through mdi class is not the right path to follow? -- closevent code def closeEvent(self, event): reply = QMessageBox.question(self, 'Confirma', "Fechar o aplicativo?", QMessageBox.Yes,QMessageBox.No) if reply == QMessageBox.Yes: self.mdi.closeAllWindows() event.accept() else: event.ignore() seconds after the windows report an application crash. Tobias Where the wild pão de queijo grows. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Form keyPress
Hi all, i tried without succes to found some examples or tips to identify keypress in a form... very simple as identify a down arrow or F2 F3 F4 keys and connect to any function.. can someone give a help? Thanks for your time. Tobias Ramos ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] difference between inits
Hi all..i have some doubts about something is happening in my code. here is it: w = window() f = QtCore.QFile(":/default.txt") f.open(QtCore.QIODevice.ReadOnly) model = TreeModel(QtCore.QString(f.readAll())) f.close() w.ui.lineEdit.setFocus() w.ui.treeView.setModel(model) w.show() this works only in init code of application ex: if __name__ == "__main__": app = QtGui.QApplication(sys.argv) w = window() f = QtCore.QFile(":/default.txt") f.open(QtCore.QIODevice.ReadOnly) model = TreeModel(QtCore.QString(f.readAll())) f.close() w.ui.lineEdit.setFocus() w.ui.treeView.setModel(model) w.show() sys.exit(app.exec_()) my question is.. why this not work: class window(QtGui.QWidget,Ui_Form): def __init__(self,parent=None): QtGui.QWidget.__init__(self,parent) self.ui = Ui_Form() self.ui.setupUi(self) self.connect(self.ui.pushButton, QtCore.SIGNAL("clicked()"), self.populaCombo) f = QtCore.QFile(":/default.txt") f.open(QtCore.QIODevice.ReadOnly) model = TreeModel(QtCore.QString(f.readAll())) f.close() self.ui.lineEdit.setFocus() self.ui.treeView.setModel(model) when i put on __init__ of inherited class even the file is read.. thanks in advance. Tobias Belo Horizonte Brasil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Adding Codes to UI
HI all... I'm starting in Pyqt and have look in some examples and open sources.. I've noticed some people extend the class generated by pyui, putting your own code.. but.. if the UI needs to be change?? or how can i add this code in makefile?? is the right thing to do? Thanks in advance. Tobias ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt