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 1122 - text alignment lost from QAbstractItemModel.data overrides
: text alignment lost from QAbstractItemModel.data overrides
Status: UNCONFIRMED
Product: PySide
Classification: Unclassified
Component: QtCore
: HEAD
: PC Linux
: P5 enhancement
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2012-01-17 02:16 EET by Joel B. Mohler
Modified: 2012-03-08 16:58 EET (History)
8 users (show)

See Also:


Attachments
example of the alignment bug (2.29 KB, text/x-python)
2012-01-17 02:16 EET, Joel B. Mohler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel B. Mohler 2012-01-17 02:16:02 EET
Created attachment 478 [details]
example of the alignment bug

Consider the following code snip in which we right align the data in column 1
of a model:

class Model(QtCore.QAbstractItemModel):
    ...
    def data(self, index, role):
        ...
        if role == QtCore.Qt.TextAlignmentRole and index.column()==1:
            return QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter
        ...

The text is instead of being right aligned is rendered in the upper left hand
corner of the view cell.

For context, there is a full example attached including the snip above.

Note that the second column (column 1) is rendered correctly in version 1.0.9,
but not in 1.1.0.
Comment 1 Matti Airas 2012-03-08 16:58:00 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!