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. Is a BUG? Qt.Key_Tab in Keys.onPressed Triggered twice
Forum Update on Monday, May 27th 2025

Is a BUG? Qt.Key_Tab in Keys.onPressed Triggered twice

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.5k 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.
  • H Offline
    H Offline
    hoozi
    wrote on last edited by
    #1

    code here:
    @
    import QtQuick 1.0

    Rectangle {
    width: 360
    height: 360

    focus: true
    Keys.onPressed: {
        if (event.key == Qt.Key_Tab) {
            console.log("pressed!");  // Triggered twice
        }
    
        //event.accepted = true;
    }
    

    }

    @

    if use other key, then only trigger once

    if accepted = true , then trigger once

    but , this is a bug?

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

      Hi,

      It certainly looks like a bug -- I'd suggest filing a bugreport at https://bugreports.qt.nokia.com/ .

      Regards,
      Michael

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hoozi
        wrote on last edited by
        #3

        Thanks Michael

        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