void QItemDelegate::setEditorData ( QWidget * editor, const QModelIndex & index ) const [virtual]
Sets the data to be displayed and edited by the editor from the data model item specified by the model index.
从model中获取数据,赋值给editor widget。
这样,用editor编辑数据的时候,就是正确的数据。
model中获取 数据
QVariant vData = index.model() ->data( index );
调用Editor widget的setValue()方法。