Results 1 to 3 of 3

Thread: why QAbstractItemDelegate provide a interface "painting"?

  1. #1
    Join Date
    Jun 2009
    Posts
    74
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default why QAbstractItemDelegate provide a interface "painting"?

    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,
    hb

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: why QAbstractItemDelegate provide a interface "painting"?

    the view displays data, it uses delegates to do (part of) the work.

  3. The following user says thank you to caduel for this useful post:

    hashb (27th October 2009)

  4. #3
    Join Date
    Jun 2009
    Posts
    74
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default Re: why QAbstractItemDelegate provide a interface "painting"?

    Hi,Caduel,

    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,
    hb

Similar Threads

  1. Replies: 3
    Last Post: 22nd December 2010, 14:22
  2. (ActiveQt) Invoking interface from COM object
    By mridulgandhi in forum Qt Programming
    Replies: 4
    Last Post: 11th October 2009, 20:29
  3. Replies: 12
    Last Post: 22nd March 2009, 11:22
  4. Interface composition and QObject
    By brcain in forum Qt Programming
    Replies: 9
    Last Post: 20th November 2006, 17:56
  5. Qt interface running extremely slowly...
    By jazztpt in forum Qt Programming
    Replies: 1
    Last Post: 4th February 2006, 11:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.