Results 1 to 5 of 5

Thread: QTableView focus issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTableView focus issue

    I don't understand what are you trying to do. Ignored events get propagated to parent widget but presumably item views handle their key presses so key press events never reach the parent widget. If you want to catch events of the table view you should reimplement its event handler or install an event filter on it. Don't expect to receive corresponding events in parent's event handler.

    Using QShortcut is not a workaround but way more elegant and simpler way to handle it...
    J-P Nurmi

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

    gemidjy (19th February 2008)

  3. #2
    Join Date
    Feb 2008
    Posts
    16
    Thanks
    3

    Default Re: QTableView focus issue

    Quote Originally Posted by jpn View Post
    I don't understand what are you trying to do. Ignored events get propagated to parent widget but presumably item views handle their key presses so key press events never reach the parent widget. If you want to catch events of the table view you should reimplement its event handler or install an event filter on it. Don't expect to receive corresponding events in parent's event handler.

    Using QShortcut is not a workaround but way more elegant and simpler way to handle it...
    Ok I will reconsider using QShortcut
    thanks

Similar Threads

  1. Force focus to a QTabWidget page's widget
    By thomaspu in forum Qt Programming
    Replies: 1
    Last Post: 2nd January 2008, 06:54
  2. focus issue
    By samirg in forum Qt Programming
    Replies: 1
    Last Post: 1st September 2007, 01:29
  3. Tab/Enter focus problem
    By b1 in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2006, 23:34
  4. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 13:49
  5. QTableView number of rows and scrollbar issue
    By jnk5y in forum Qt Programming
    Replies: 3
    Last Post: 1st March 2006, 06:55

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.