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. Prevent list from capturing keys
Forum Updated to NodeBB v4.3 + New Features

Prevent list from capturing keys

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.9k 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.
  • T Offline
    T Offline
    ThaRez
    wrote on last edited by
    #1

    Hello
    I'm developing a software which UI the user navigates using only the keyboard. I've implemented the:

    @keyPressEvent(QKeyEvent *e)@

    This works fine, until a layout with a list on it is opened. My problem is that the list captures the key presses.
    How can I prevent this? Do I have to make a new list object and re implement the key press function?
    Or is there a better way? Thank you!
    Best regards
    Richard

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fluca1978
      wrote on last edited by
      #2

      Can you take away the focus from the list and give it to the component that is going to filter it?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        ThaRez
        wrote on last edited by
        #3

        Stupid question, but how can I remove the focus from the list without adding another element that has a focus property? I'd like to send the keypresses to the layout object. I've tried to debug by clicking the layout widget itself, but apparently the focus stays locked to the list (responds to arrow up/down).

        • Richard
        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