Results 1 to 2 of 2

Thread: Select next row in TableView by javascript

  1. #1
    Join Date
    Apr 2014
    Location
    Płock, Poland
    Posts
    13
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Select next row in TableView by javascript

    How to change currentrow in TableView by javascript ?
    Qt Code:
    1. function goToNextItem()
    2. {
    3. var currentindexnumber = mainTable.currentRow;
    4. var nextindexnumber = currentindexnumber+1;
    5. mainTable.selection.clear();
    6. mainTable.selection.select(nextindexnumber);
    7. console.log(mainTable.currentRow); // this report a current row, but value is not changed
    8. }
    To copy to clipboard, switch view to plain text mode 
    Why this code doesn't work ?

  2. #2
    Join Date
    Apr 2014
    Location
    Płock, Poland
    Posts
    13
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Select next row in TableView by javascript

    I resolve this: mainTable.currentRow=nextindexnumber;

Similar Threads

  1. Replies: 5
    Last Post: 9th June 2014, 16:40
  2. Replies: 1
    Last Post: 29th April 2011, 23:50
  3. Help with QML, JavaScript and C++
    By chetu1984 in forum Qt Quick
    Replies: 5
    Last Post: 14th February 2011, 22:42
  4. Replies: 9
    Last Post: 29th November 2010, 12:12
  5. Javascript
    By ale301168 in forum Qt Programming
    Replies: 0
    Last Post: 6th September 2008, 23:23

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.