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. Windows menu rollover: first menu can't click?
Forum Updated to NodeBB v4.3 + New Features

Windows menu rollover: first menu can't click?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 617 Views 2 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.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by
    #1

    see this lovely movie:
    https://karaoke.kjams.com/screenshots/no_click.mp4

    any idea about that?
    the screen is at 200% (HiDPI)

    there is nothing invisible in the UI at that location, see my ui file here:

    0_1548967824244_Screen Shot 2019-01-31 at 12.50.00 PM.png

    the menus are created programmatically, there is nothing special about the first menu

    any idea why it won't respond to clicks or roll overs?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on last edited by
      #5

      @Chris-Kawa said in Windows menu rollover: first menu can't click?:

      a.topLevelWidgets().front()->dumpObjectTree()

      that was very helpful! the output hinted at a sub (context) menu (which should be invisible). indeed, the owner object of all context menus was visible! i hid it, and boom, all fixed! wow thanks!

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Looks like there's something there after all. Maybe something added from the code. It probably works on drag because it grabs mouse on mouse press.

        An easy test to do:

        qApp->setStyleSheet("QWidget { border: 1px solid red; }");
        

        or

        qDebug() << qApp->widgetAt(qApp->topLevelWidgets().front()->mapToGlobal(QPoint(5,5)));
        
        1 Reply Last reply
        2
        • D Offline
          D Offline
          davecotter
          wrote on last edited by davecotter
          #3

          @Chris-Kawa said in Windows menu rollover: first menu can't click?:

          qApp->setStyleSheet("QWidget { border: 1px solid red; }");

          I humbly bow before your insane ninja skills!!!

          0_1548977150178_Screen Shot 2019-01-31 at 3.25.14 PM.png

          Now how do i figure out just what it is that's at that spot??

          0_1548978174638_Screen Shot 2019-01-31 at 3.42.42 PM.png

          i tried this:

          0_1548979606256_Screen Shot 2019-01-31 at 4.06.25 PM.png

          But that just prints an empty line in the console :/

          1 Reply Last reply
          0
          • Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by Chris Kawa
            #4

            whatsThis() is only set if you set it. That's not gonna be useful here.

            qDebug will print the class and object name. You're just missing #include <QDebug> to use it.
            Alternatively you can do a.topLevelWidgets().front()->dumpObjectTree(); and dig through the output to see what shouldn't be there.
            Yet another way is to set a breakpoint and inspect whatP in the debugger. It might reveal its class, object name or other useful info that will lead you to the source of it.

            1 Reply Last reply
            2
            • D Offline
              D Offline
              davecotter
              wrote on last edited by
              #5

              @Chris-Kawa said in Windows menu rollover: first menu can't click?:

              a.topLevelWidgets().front()->dumpObjectTree()

              that was very helpful! the output hinted at a sub (context) menu (which should be invisible). indeed, the owner object of all context menus was visible! i hid it, and boom, all fixed! wow thanks!

              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