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 308 - Confusing error for wrong argument types
: Confusing error for wrong argument types
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-08-24 08:35 EEST by Matti Airas
Modified: 2010-09-10 19:21 EEST (History)
7 users (show)

See Also:


Attachments
Script printing out the error. (1.77 KB, text/x-python)
2010-08-24 08:35 EEST, Matti Airas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Airas 2010-08-24 08:35:28 EEST
Created attachment 59 [details]
Script printing out the error.

I began reviewing and fixing PySide examples so that they would run properly.

I modified examples/designer/calculatorform/calculatorform.py so that
PySide.QtGui.QLabel.setText is called with an int value. I get the following
error:

Traceback (most recent call last):
  File "./calculatorform.py", line 42, in on_inputSpinBox1_valueChanged
    self.ui.outputWidget.setText(value + self.ui.inputSpinBox2.value())
TypeError: 'PySide.QtGui.QLabel.setText' called with wrong argument types:
  PySide.QtGui.QLabel.setText(int)
Supported signatures:
  PySide.QtGui.QLabel.setText(QString)

Given that the end-user interface doesn't deal with QStrings any longer,
shouldn't the supported signature be:
  PySide.QtGui.QLabel.setText(str)

Another matter is that should we actually support such type conversions? That
would be Pythonic but potentially a source for errors. I'll ask the mailing
list.
Comment 1 Hugo Parente Lima 2010-08-24 17:20:15 EEST
Fixed in commit shiboken/25dc57003ae47dd6d66cd44156872ff484868bce