[PyKDE] Segfault
Tobias Rundström
tru at xmms.org
Sun Jul 23 04:36:38 BST 2006
Hello list,
The following test program triggers a segfault with PyQt-4.0.1 and Qt
4.1.4 on MacOSX 10.4.7
Thanks,
Tobias
from PyQt4 import QtCore, QtGui
import sys
class TreeWidget(QtGui.QTreeWidget):
def __init__(self, parent):
QtGui.QTreeWidget.__init__(self, parent)
self.setColumnCount(1)
for u in range(10):
i = QtGui.QTreeWidgetItem(self, [str(u)])
for y in range(10):
QtGui.QTreeWidgetItem(i, [str(y)])
self.connect(self, QtCore.SIGNAL("itemDoubleClicked
(QTreeWidgetItem *, int)"), self.dbclick)
def dbclick(self, item, column):
self.clear()
for y in range(10):
QtGui.QTreeWidgetItem(i, [str(y)])
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
tree = TreeWidget(self)
self.setCentralWidget(tree)
tree.show()
app = QtGui.QApplication(sys.argv)
mw = MainWindow()
mw.show()
app.exec_()
More information about the PyQt
mailing list