QDataWidgetMapper
-
Is there any way to make QDataWidgetMapper use two different roles for displaying data in mapped widgets? I want to show formatted string from (for example) DisplayRole by default in QLineEdit, and raw data string from (for example) EditRole when user starts editing it.
-
Hi,
From the looks of it, a custom QStyledItemDelegate might be what you are looking for. See the setItemDelegate documentation.