I have the following statement in an application that runs fine with Python 2.6 
(and PyQt): 

text = self.ui.txtText.text().left(5).toUpper() 

In Python 3.1.1 (with PyQt), I get the following error for the first statement: 

" text = self.ui.txtText.text().left(5).toUpper() 
AttributeError: 'str' object has no attribute 'left' " 


The "ui.txtText.text" object is a QLineEdit object, whose documentation 
indicates that its "text()" function returns a QString object, whose 
documentatation states that the "left( self , n)" and "toUpper() functions are 
supported. What has changed between Python 2.6 and Python 3.1 that would 
account for this error? 

Thanks. 

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to