Windows menu rollover: first menu can't click?
-
see this lovely movie:
https://karaoke.kjams.com/screenshots/no_click.mp4any idea about that?
the screen is at 200% (HiDPI)there is nothing invisible in the UI at that location, see my ui file here:
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?
-
@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!
-
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)));
-
@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!!!
Now how do i figure out just what it is that's at that spot??
i tried this:
But that just prints an empty line in the console :/
-
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 doa.topLevelWidgets().front()->dumpObjectTree();
and dig through the output to see what shouldn't be there.
Yet another way is to set a breakpoint and inspectwhatP
in the debugger. It might reveal its class, object name or other useful info that will lead you to the source of it. -
@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!