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 71 - chart.py example breaks when clicking the chart
: chart.py example breaks when clicking the chart
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2009-09-25 10:45 EEST by Luciano Wolf
Modified: 2009-10-14 14:17 EEST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luciano Wolf 2009-09-25 10:45:50 EEST
The example chart.py at /pyside-examples/examples/itemviews/chart breaks when
you click the pie chart with the following error message:

Traceback (most recent call last):
  File "./chart.py", line 573, in <module>
    sys.exit(app.exec_())
  File "./chart.py", line 382, in setSelection
    if not region.intersect(QtGui.QRegion(contentsRect)).isEmpty():
Boost.Python.ArgumentError: Python argument types in
    QRegion.intersect(QRegion, QRegion)
did not match C++ signature:
    intersect(QRegion {lvalue}, QRect)

If you change line #382:
- if not region.intersect(QtGui.QRegion(contentsRect)).isEmpty():
+ if not
region.intersect(QtGui.QRegion(contentsRect).boundingRect()).isEmpty():

the test generates another error:

Traceback (most recent call last):
  File "./chart.py", line 573, in <module>
    sys.exit(app.exec_())
  File "./chart.py", line 310, in paintEvent
    self.style().drawControl(QtGui.QStyle.CE_RubberBand, band, painter)
Boost.Python.ArgumentError: Python argument types in
    QGtkStyle.drawControl(QGtkStyle, ControlElement, QStyleOptionRubberBand,
QPainter)
did not match C++ signature:
    drawControl(QGtkStyle, QStyle::ControlElement, QStyleOption const*,
QPainter*, QWidget const*)
QPainter::end: Painter ended with 2 saved states
Comment 1 Hugo Parente Lima 2009-09-25 11:11:46 EEST
intersect method is deprecated, the correct version is intersected.
Deprecated methods are not supported by PySide.