Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. KeyNavigation for component
Qt 6.11 is out! See what's new in the release blog

KeyNavigation for component

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 723 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.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by
    #1

    Hello,
    how to do tab navigation in a form which consists of input element defined in separate file?

    // Input1.qml
    Rectangle{
            TextInput{
              id: inputField
            }
        }
    
    Input1{
                id: firstName
                // on tab go to surname
            }
    
    Input1{
                id: surname
                // on tab fo to firstName
            }
    
    1 Reply Last reply
    0
    • J Offline
      J Offline
      JordanHarris
      wrote on last edited by
      #2

      I believe you can achieve this by wrapping the component in a FocusScope. This article and example should be enough to get you there.

      http://doc.qt.io/qt-5/qtquick-input-focus.html
      http://doc.qt.io/qt-5/qtquick-keyinteraction-example.html

      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