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. QML Txt with multiple links - keyboard navigation

QML Txt with multiple links - keyboard navigation

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

    Hello

    I have a QML Text element with multiple links :

    Text {
        text: "Lorem ipsum <a href='https://www.google.com'>dolor</a> sit amet, consectetur adipiscing elit. Pellentesque convallis mi urna, nec condimentum sapien cursus a. In hac <a href='https://www.google.com'>habitasse</a> platea dictumst. Vivamus faucibus, metus in porta aliquet, neque dolo."
    }
    

    I would like to make it possible to navigate between the links using the keyboard.

    I am aware of the usual solution for navigating between elements :

    Keys.onTabPressed: focusOnNextItem()
    Keys.onBacktabPressed: focusOnPreviousItem()
    

    in combination with :

    elementToFocusOn.forceActiveFocus()
    

    , but the QML Text element is always represented by one QML object. It doesn't matter how many links it contains. I am not sure how I could navigate between these links with the keyboard.

    What would be the best possible solution for this?

    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