Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.6.2, 4.7.1
-
None
-
OS X 10.6.x
Description
The documentation for QDataWidgetMapper indicates that any display field can be mapped to a type of QAbstractItemModel. However, this is not the case.
In my testing, only editable fields display data. This was brought to my attention when none of the fields I'd mapped were being set. I think traced execution and saw that the only Qt::DisplayRole that the mapper was calling was Qt::EditRole.
To simplify things, I referred to the Qt provided examples for the QDataWidgetMapper. I changed the LineEdit pointers to QLabel pointers and saw the same behavior.
Example Project: simplewidgetmapper
Source URL: http://doc.trolltech.com/qq/qq21-datawidgetmapper.html
By changing the type of widget being mapped to, the project breaks.