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

List:       pykde
Subject:    Re: [PyKDE] python lists of QStrings
From:       "Phil Thompson" <phil () riverbankcomputing ! co ! uk>
Date:       2005-04-14 12:51:31
Message-ID: 37575.82.68.80.137.1113483091.squirrel () river-bank ! demon ! co ! uk
[Download RAW message or body]

> Hello,
>
> I have a problem. I find it useful to build lists of strings in Python and
> pass them to methods like QListBox.insertStrList. The problem is that if I
> use Qt's i18n support, I end up with Python lists of QStrings, such as:
>
> items = [ self.tr("Foo"), self.tr("Bar"), self.tr("FooBar") ]
>
> There is no easy way to pass this thing to a QListBox/QComboBox withou an
> explicit iteration.
>
> I believe that we could use an implicit conversion from the above to
> QStringList. Either to that, or to QStrList, but I think the former maps
> better: QStrList is a list of char* in C++, after all.

I'll add it to the TODO list.

Phil

_______________________________________________
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