Results 1 to 6 of 6

Thread: QItemEditorFactory and custom Model

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QItemEditorFactory and custom Model

    You did not provide code of the delegate but of the widget used for editing - don't mix those two. The problem here might be that you register the editor for QString and by default the model doesn't contain strings (if it's empty, for example). In your case I'd suggest to subclass the delegate class and reimplement QAbstractItemDelegate::createEditor() to return your widget instead of QLineEdit.

  2. The following user says thank you to wysota for this useful post:

    maximAL (23rd November 2007)

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
  •  
Qt is a trademark of The Qt Company.