[PyKDE] howto handle QVariant.toList()?
Andreas Pakulat
apaku at gmx.de
Wed Jun 28 23:49:50 BST 2006
Hi,
I'm facing an issue here where I have a QStringList stored in a
QVariant, which means I have a QVariant whose toList function returns a
list of QVariants with all wrap QStrings.
The question is: How can I easily pass this list to a function which
expects a QStringList? I don't really think that
combobox.addItems([QVariant(item) for item in variant.toList()])
is the nicest way, even if it looks quite "cool".
Andreas
--
Courage is your greatest present need.
More information about the PyQt
mailing list