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 Update on Monday, May 27th 2025

[Solved] Tableview tab key problem!

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views
  • 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 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
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on 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 last edited by
        #3

        Thanks mate!

        That did the trick!

        1 Reply Last reply
        0

        • Login

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