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 26 - Incompatible arguments passed to QPixmap.load()
: Incompatible arguments passed to QPixmap.load()
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2009-08-30 00:07 EEST by Carlos Gonçalves
Modified: 2009-10-14 14:17 EEST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Gonçalves 2009-08-30 00:07:00 EEST
carlos@corenux:~/devel/scm/pyside-examples/examples/painting/basicdrawing>
python basicdrawing.py
Traceback (most recent call last):
  File "basicdrawing.py", line 323, in <module>
    window = Window()
  File "basicdrawing.py", line 148, in __init__
    self.renderArea = RenderArea()
  File "basicdrawing.py", line 52, in __init__
    self.pixmap.load(":/images/qt-logo.png")
Boost.Python.ArgumentError: Python argument types in
    QPixmap.load(QPixmap, str)
did not match C++ signature:
    load(QPixmap {lvalue}, QString None, char const* None=0,
QFlags<Qt::ImageConversionFlag> None=0)


The second argument ('const char * format = 0') requires a char and we are
passing an integer (zero) which in C++ is valid, but not in Python. Default
should be 'None', no?

Patching (as a workaround) to "self.pixmap.load(":/images/qt-logo.png", None)"
works fine.
Comment 1 Carlos Gonçalves 2009-08-31 11:22:31 EEST
Furthermore, this does not only affect QPixmap.load() as it hit all "const
char*" function parameters from any class too.
Comment 2 Hugo Parente Lima 2009-09-04 14:32:22 EEST
Fixed, waiting for code review.
Comment 3 Hugo Parente Lima 2009-09-04 14:41:40 EEST
merged into mainline