On Saturday 23 July 2011, 07:49:02 Martin Airs wrote:
> On Saturday 23 July 2011 07:41:18 Vincent Vande Vyvre wrote:
> > It's normal,  lineedit.text() returns a QString and Python don't
> > like that.
> >
> > Use :  os.path.split(str(self.lineedit.text()))
> >
> > --
> > Vincent V.V.
> > Oqapy . Qarte+7 . PaQager
>
> Aha, thats got it, thankyou very much

While at it, either use unicode instead of str or begin your script 
(before the first PyQt4 import) with:

import sip
sip.setapi('QString', 2)

which would convert all QStrings to unicode strings behind the scenes 
for you, hence your snippet wouldn't have thrown that exception in the 
first place.

Pete
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to