[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] howto handle QVariant.toList()?
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2006-06-28 22:49:50
Message-ID: 20060628224950.GA24728 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

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.

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic