PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 867 - QLineEdit.setText error with unicode string
: QLineEdit.setText error with unicode string
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: PC Linux
: P5 major
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-05-28 23:58 EEST by rocher.jm
Modified: 2011-06-22 20:25 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rocher.jm 2011-05-28 23:58:04 EEST
I try to use QLineEdit.setText(instance) with an unicode string comming from a
tupple, and pyside get back the following error:

unhandled TypeError, 'PySide.QtGui.QLineEdit.setText' called with wrong
argument types:
  PySide.QtGui.QLineEdit.setText(instance)
Supported signatures:
  PySide.QtGui.QLineEdit.setText(QString)

signature sound very weird because I understand QString class is no longuer in
use in pyside
Comment 1 Hugo Parente Lima 2011-05-30 17:32:31 EEST
I think you are not really passing an unicode instance to the setText method.

This example calls setText method of QLineEdit with an unicode object and works
nicely:

from PySide.QtCore import *
from PySide.QtGui import *

app = QApplication([])
w = QLineEdit()
w.setText(u'Hello')
w.show()
app.exec_()
Comment 2 Hugo Parente Lima 2011-05-30 21:18:30 EEST
I'm marking the bug as invalid as probably you aren't using the right type on
setText method, but feel free to reopen the bug if you could write a
reproducible test case for it.

About the "QString" in the error message, this was fixed in commit:

pyside/2ddeb1b5c83bd30463c04145e2b21e2cd0d61451

Regards.
Comment 3 renato filho 2011-06-22 20:25:05 EEST
release 1.0.4