Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Tableview tab key problem!
Forum Updated to NodeBB v4.3 + New Features

[Solved] Tableview tab key problem!

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    skammers
    wrote on 30 Jul 2014, 06:38 last edited by
    #1

    Hey!

    I have a tableview where I want to to customize where the focus is set next when you push the tab key. All keys works perfectly except for the tab key and back tab. Seems like the default overrides my command.

    What do I need to do?

    @
    TableView{
    id: masterTable;
    TableViewColumn{
    id: masterCol;
    role: "english";
    title: "Text";
    elideMode: Text.ElideNone;
    }
    model: masterResource.filteredList;
    itemDelegate: tableItemDelegate;
    headerVisible: false;

                            onClicked: {
                                if(madeList){
                                    updateScrollBar();
                                    selectable = true;
                                    setSelections();
                                }
                            }
    
                            //Works perfectly
                            Keys.onDigit0Pressed: {
                                console.log(currentRow);
                            }
    
                              //None of the below works
    

    // Keys.onBacktabPressed: {
    // console.log("Backtab pressed!");
    // }
    // Keys.onTabPressed: {
    // console.log("Hei");
    // }

    // KeyNavigation.backtab: langInput;

    @

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p3c0
      Moderators
      wrote on 30 Jul 2014, 09:55 last edited by
      #2

      Hi,

      Try setting "activeFocusOnTab":http://qt-project.org/doc/qt-5/qml-qtquick-item.html#activeFocusOnTab-prop to false.

      157

      1 Reply Last reply
      0
      • S Offline
        S Offline
        skammers
        wrote on 30 Jul 2014, 10:03 last edited by
        #3

        Thanks mate!

        That did the trick!

        1 Reply Last reply
        0

        1/3

        30 Jul 2014, 06:38

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved