[PyKDE] viewing a QStandardItemModel
ak at e-dict.net
Wed Feb 21 17:43:03 GMT 2007
i have a column in a QStandardItemModel filled with a numerical value. now i
want to show this in a QTableView in a different way, the value represents some
kind of state, so i don't want to see a number, but a string like "ok" or "not ok".
although i think that is an aspect of the view, i thought that the roles can do
this, so i set the numerical value for the Qt.EditRole and the string for
so much for the theory, it doesn't work. so attached code shows twice the string
"one" and not 1 and "one" as i would expect.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 347 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070221/fe877925/standarditemmodel.py
More information about the PyQt