Results 1 to 2 of 2

Thread: QItemDelegate::editorEvent

  1. #1
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QItemDelegate::editorEvent

    I'm trying to do custom editing in a table via a sub-class of QItemDelegate. But the editorEvent method does not seem to work. If i set the focus policy of the view to Qt::StrongFocus, it captures mouse click events, but it still doesn't capture key events such as Tab, etc. I know I can use QObject::eventFilter, but that's a lot less convenient because it doesn't provide access to the model. Is there some way to have editorEvent capture key press events?
    Jim L
    Seattle, WA

  2. #2
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QItemDelegate::editorEvent

    It just occurred to me after posting this question that maybe the problem is that the editor provided by the delegate gets created on a focus in event and destroyed on a focus out event. Maybe I need to look focus events at the view level rather than at the delegate level.
    Jim L
    Seattle, WA

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.