[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] how to covert an object text to string?
From: Roberto Alsina <ralsina () kde ! org>
Date: 2009-04-06 12:46:31
Message-ID: cone.1239021991.407088.3091.1000 () hp
[Download RAW message or body]
klia writes:
>
> hey guys
>
> This is in Pyqt
>
> I have this code
>
> filename=os.path.basename(self.lwitem.text())
>
> which self.lwitem.text() holds my filename path but i wanna convert it into
> a string how am i gonna do that??
You mean self.lwitem.text() is a QString and want to convert it to a string?
str(self.lwitem.text())
But you probably want to convert it to unicode instead using unicode()
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic