Results 1 to 2 of 2

Thread: QTableWidget and creating my own editor

  1. #1
    Join Date
    Apr 2007
    Location
    Toruń, POLAND
    Posts
    24
    Thanks
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default QTableWidget and creating my own editor

    Hello,

    I know how to create my own editor in Qt3 but I can't figure it out in Qt4. I see no method in Qtablewidget and Qtablewidgetitem responsible for creating editor for given cell, except for openpersisteneditor, however this method is not virtual so even I write my own, it is never called.

    So, how to create my own editor for cells in QTableWidget? Thank you in advance.

    bye

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTableWidget and creating my own editor

    In Qt4 the delegate is responsible for creating editors. So if you want a custom editor, you have to either register it with the existing (standard) delegate or provide your own delegate subclass.

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

    macias (13th June 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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.