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 969 - viewOptions of QAbstractItemView error
: viewOptions of QAbstractItemView error
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: 1.0.5
: PC All
: P1 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-08-17 09:01 EEST by kuai.xiaopeng
Modified: 2012-01-02 21:44 EET (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 kuai.xiaopeng 2011-08-17 09:01:23 EEST
when run the chart.py the viewOptions function return an unkonw object that
have no font and any other member belong to the QStyleOptionViewItem.

C:\WINDOWS\system32\cmd.exe /c "C:\Python26\python.exe" chart.py
Traceback (most recent call last):
  File "chart.py", line 357, in scrollTo
    rect = self.visualRect(index)
  File "chart.py", line 426, in visualRect
    rect = self.itemRect(index)
  File "chart.py", line 153, in itemRect
    itemHeight = QtGui.QFontMetrics(self.viewOptions().font).height()
RuntimeError: Internal C++ object (PySide.QtGui.QFont) already deleted.
Traceback (most recent call last):
  File "chart.py", line 426, in visualRect
    rect = self.itemRect(index)
  File "chart.py", line 153, in itemRect
    itemHeight = QtGui.QFontMetrics(self.viewOptions().font).height()
RuntimeError: Internal C++ object (PySide.QtGui.QFont) already deleted.
Traceback (most recent call last):
  File "chart.py", line 426, in visualRect
    rect = self.itemRect(index)
  File "chart.py", line 153, in itemRect
    itemHeight = QtGui.QFontMetrics(self.viewOptions().font).height()
RuntimeError: Internal C++ object (PySide.QtGui.QFont) already deleted.
shell returned -1073741819
Comment 1 kuai.xiaopeng 2011-08-17 09:38:49 EEST
The chart.py is the example of PySide of itemviews directory.
Comment 2 Hugo Parente Lima 2011-08-17 21:43:12 EEST
On my machine is even worst, a segfault occur :-/
Comment 3 Hugo Parente Lima 2011-10-12 00:15:04 EEST
This bug is fixed on Marcelo's branch (converters) and the fix will land on
mainline soon when this branch get merged into mainline.

The bug wasn't fixed on mainline because all the work that would be made to fix
it on mainline will be useless because Marcelo's work will overwrite it, i.e.
the bug is on converters code and Marcelo is working on a huge refactor in the
converters code.

So, by now, a unit test was created and sent to Marcelo's branch where it pass.

Regards and thanks for the report.
Comment 4 Hugo Parente Lima 2011-12-19 19:40:14 EET
The converters branch was finally merged into mainline, so this bug can be
considered fixed.