Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.2
-
None
-
Python 3.8.6
PySide6==6.4.2
Description
Binding a property of the delegate of a `HorizontalHeaderView` to a custom role of a `QAbstractTableModel` doesn't successfully fetch the relevant data from `headerData()`.
Note that when running the example below:
- Header text says "This is display table data"
- Table text says "This is custom table data"
- Terminal shows `Display header data requested`
- Terminal shows `Custom table data requested`
To reproduce bug:
- Change the line marked `// BUG HERE` to `text: model.my_custom_role`.
Expected behaviour:
- Header text shows "This is custom data", just like the table itself.
- Terminal shows `Custom header data requested`
Actual behaviour:
- Header text blank
- Error message in terminal: "Unable to assign [undefined] to QString"
- Terminal does not show `Custom header data requested`