Results 1 to 3 of 3

Thread: How to go to next cell using Return key on QTableView ?

  1. #1
    Join Date
    Feb 2018
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default How to go to next cell using Return key on QTableView ?

    Hello,

    I have a QTableView and here is my expected workflow :
    1. Select a cell and edit it
    2. Press Return/Enter key to validate the changes (default Qt behavior)
    3. The cell below the edited one should be the new current item, ready to be edited next

    I found out how to go to the next cell using model::index and model::setCurrentIndex but I did not find out how to trigger that on Return/Enter key pressed !

    Can you please help me ?
    Thank you

  2. #2
    Join Date
    Dec 2017
    Location
    Nigeria
    Posts
    3
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Android

    Default Re: How to go to next cell using Return key on QTableView ?

    Can you simply post the aspect of the code where you were able to navigate to a next cell?

  3. #3
    Join Date
    Feb 2018
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to go to next cell using Return key on QTableView ?

    Hello and thank you for your answers.
    I successfully managed to do that using an eventFilter on the QTableView

Similar Threads

  1. Jump to a cell in QTableView
    By toodles in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2012, 06:07
  2. Replies: 2
    Last Post: 12th October 2010, 20:50
  3. How to tell if QTableView cell is visible ?
    By steviekm3 in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2009, 10:04
  4. how to get data from cell of QTableview
    By yleesun in forum Qt Programming
    Replies: 2
    Last Post: 9th January 2009, 14:31
  5. How to select a cell in a QTableView
    By JeanC in forum Qt Programming
    Replies: 6
    Last Post: 6th February 2008, 13:20

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.