[PyKDE] howto handle QVariant.toList()?

Andreas Pakulat apaku at gmx.de
Thu Jun 29 09:21:32 BST 2006


On 29.06.06 08:50:35, Phil Thompson wrote:
> On Wednesday 28 June 2006 11:49 pm, Andreas Pakulat wrote:
> > 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".
> 
> variant.toStringList() ???

Sorry, missed that one in the docs...

Thanks
Andreas

-- 
You are wise, witty, and wonderful, but you spend too much time reading
this sort of trash.




More information about the PyQt mailing list