Results 1 to 2 of 2

Thread: QItemEditorFactory and QStyledDelegate

  1. #1
    Join Date
    Jul 2012
    Posts
    40
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QItemEditorFactory and QStyledDelegate

    Hi guys.
    I have one question about QTableView and Model/View Programming...Is it right that the method createEditor of QStyledDelegate does nothing, if I set a default factory for each datatype in the view?

    Qt Code:
    1. QItemEditorFactory::setDefaultFactory(factory);
    To copy to clipboard, switch view to plain text mode 

    And is it right that QItemEditorFactory is just a smarter attempt of creating different editors for types, than having a couple of if-condition in QStyledDelegate::createEditor for each type?

    thanks
    Pursue your targets and don't give up....

  2. #2
    Join Date
    Jul 2012
    Posts
    40
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QItemEditorFactory and QStyledDelegate

    No ideas?
    I don't understand the sense of QItemEditorFactory, if I have a custom QStyledItemDelegate with implemented method createEditor...

    http://www.qtcentre.org/threads/1036...d-custom-Model

    this thread explains it a bit, but I would be very happy, if someone can share a bright explanation...
    Last edited by Qtonimo; 1st October 2012 at 21:36.
    Pursue your targets and don't give up....

Similar Threads

  1. Replies: 0
    Last Post: 29th April 2011, 08:52
  2. QItemEditorFactory for QList.
    By hickscorp in forum Qt Programming
    Replies: 1
    Last Post: 29th October 2010, 12:32
  3. How to connect signal/slot in QItemEditorFactory?
    By yyalli in forum Qt Programming
    Replies: 1
    Last Post: 4th June 2010, 14:56
  4. Q_ENUMS, QItemEditorFactory
    By Kunchok in forum Qt Programming
    Replies: 8
    Last Post: 21st January 2008, 12:20
  5. QItemEditorFactory and custom Model
    By maximAL in forum Qt Programming
    Replies: 5
    Last Post: 26th November 2007, 13:45

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.