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. Menu items get stuck in debug
Qt 6.11 is out! See what's new in the release blog

Menu items get stuck in debug

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

    When I'm debugging an application with Qml menus I can't click anywhere else once I click on a Menu. As an example I was testing with this code in ApplicationWindow
    @ menuBar: MenuBar {
    Menu {
    title: qsTr("File")
    MenuItem {
    text: qsTr("Exit")
    onTriggered: Qt.quit();
    }
    }

        Menu {
            title: "Test 1"
            MenuItem { text: "1" }
            MenuItem { text: "2" }
            MenuItem { text: "3" }
        }
    }@
    

    If I'm running in debug and I click File, then the menu stays open until I click something within that menu. I.e. I can't click in the window, I can't mouse over to Test 1, and I can't close via windows decorations. I can move the window which ends up leaving the menu behind. This works perfectly fine if I'm not running debug.

    I've also discovered the same thing happening with qmlscene. If I run the gallery example with qmlscene it works fine, but if I run qmlscene under gdb the menus don't work (become sticky).

    My gdb version: GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Babalas
      wrote on last edited by
      #2

      This was a hint
      @Qt: gdb: -nograb added to command-line options.
      Use the -dograb option to enforce grabbing.
      @
      I passed -dograb to run in gdb and this solved the issue.

      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