View Full Version : why QAbstractItemDelegate provide a interface "painting"?

22nd October 2009, 03:57
From the QT manual of QAbstractItemDelegate,we can see:
"The QAbstractItemDelegate class is used to display and edit data items from a model"

But what confusing me is :
I think It should be view’s job to display the data rather than delegate,because in MVC , “view ” is responsible for presenting the data to the user ,”control ” converting user actions into requests to navigate or edit data.

So QT let delegate to display data ,is it confusing ? if so ,what should view do ?

Thanks advance,

22nd October 2009, 09:08
the view displays data, it uses delegates to do (part of) the work.

22nd October 2009, 09:22

Thanks for your answer!
I studied QAbstractItemView again,and found that it seemed "view" only care about
"represent", but it does not care about represent "what" .
"what" is delegated to "delegator" .
is this the mechanism between view and delegator?

Best regards,