Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QMl keyhandling issues
Forum Updated to NodeBB v4.3 + New Features

QMl keyhandling issues

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 1.8k 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.
  • A Offline
    A Offline
    AdnanShoukat
    wrote on last edited by
    #1

    i have two listviews in qml.from one listview i reach to the next.for touch it is working fine.but i have to make this working for non touch also.the issue is the first list view is working fine with key up and down while the second one is not working with keys.can anybody knows how to resolve this issue??

    Thanks in advance

    Adnan Shoukat

    1 Reply Last reply
    0
    • M Offline
      M Offline
      miksuh
      wrote on last edited by
      #2

      It's obviously a focus problem. One of your listviews has a focus, and another has not. Only one item can have active focus at the same time.

      One solution is to use KeyNavigation attached property. If you use it, then you can move the active focus from one listview to another by pressing eg. tab key, or eg. arrow keys.

      Here is an example:

      @ListView {
      id: list1
      ...
      focus: true
      KeyNavigation.tab: list2
      KeyNavigation.right: list2
      ...
      }

      ListView {
      id: list2
      ...
      KeyNavigation.tab: list1
      KeyNavigation.left: list1
      ...
      }@

      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