[PyQt] Possible QTreeWidgetItem constructor bug
phil at riverbankcomputing.com
Mon Apr 16 12:47:05 BST 2012
On Mon, 16 Apr 2012 14:46:54 +1200, Glenn Ramsey <gr at componic.co.nz>
> If this QTreeWidgetItem constructor is called with a single string
> of a
> list of strings for the "strings" parameter, then on my system (Win 7,
> 2.6.5, Qt 4.7.4, PyQt 4.8.5) it crashes the python interpreter.
> QTreeWidgetItem.__init__ (self, QTreeWidget parent, QStringList strings,
> type = QTreeWidgetItem.Type
> Shouldn't that cause an Attribute error to be raised?
No. PyQt allows any sequence of strings to be used where a QStringList is
expected - and a string is a sequence of (1 character) strings.
However it shouldn't crash (unless it is a Qt bug). Have you got a
complete test script that demonstrates the problem?
More information about the PyQt