Windows menu rollover: first menu can't click?
-
wrote on 31 Jan 2019, 20:51 last edited by
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?
-
wrote on 1 Feb 2019, 01:42 last edited by
@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)));
-
wrote on 31 Jan 2019, 23:26 last edited by davecotter 2 Jan 2019, 00:07
@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 :/
-
Lifetime Qt Championwrote on 1 Feb 2019, 00:24 last edited by Chris Kawa 2 Jan 2019, 00:28
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. -
wrote on 1 Feb 2019, 01:42 last edited by
@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!
4/5