Results 1 to 3 of 3

Thread: Handle KeyRelease or KeyPress on any row in QTableView

  1. #1
    Join Date
    Feb 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Exclamation Handle KeyRelease or KeyPress on any row in QTableView

    How Can I Handle KeyRelease or KeyPress on any row in QTableView ?

    e.g. i want to handle when DELETE key released to delete the selected row in QTableView, How can i do that ?
    Also, INSERT key to insert empty row so the user can edit it's data to be as a new row, How ?

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Handle KeyRelease or KeyPress on any row in QTableView

    Have you tried subclassing the control and overriding keyPressEvent? Or installing an event filter on the QTableView?

  3. #3
    Join Date
    Feb 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Handle KeyRelease or KeyPress on any row in QTableView

    thanks but, ..
    Can you give me an example ?

Similar Threads

  1. problem with keypress event and QTableView
    By ranna in forum Qt Programming
    Replies: 4
    Last Post: 24th August 2009, 16:13
  2. Problem with KeyPress event and QTableView
    By ranna in forum Qt Programming
    Replies: 1
    Last Post: 16th January 2009, 20:01
  3. fn+f1 keypress detect
    By oguzy in forum Qt Programming
    Replies: 1
    Last Post: 16th November 2008, 16:21
  4. keypress event
    By vishesh in forum Qt Programming
    Replies: 2
    Last Post: 3rd November 2007, 14:12
  5. keypress while editing an item in QListWidget
    By Beluvius in forum Qt Programming
    Replies: 3
    Last Post: 4th April 2006, 09:56

Tags for this Thread

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.