Now a small hiccup, after adding this auto-hide menu, if there is any widget that's overlapping the menu widget's region, then it's not responding and also the menu widget is shown under it.
So if there is any other widget, and when the menu widget is shown, it's moving under visible widget.
Is there anything like bring-to-front, etc, for bringing the menu widget to front. I tried setFocus(); but didn't solve the issue.
How do I bring the menu widget to top-most visible area and mouse hover on the other widgets in that page should be relative ?
I tried, but didn't work as expected:
menuWidget->setWindowFlags(Qt::WindowStaysOnTopHint); // menu widget is child of mainwidget(central Widget of main window) and is not in layout
menuWidget->raise();
frmWidget->setWindowFlags(Qt::WindowStaysOnBottomHint);
menuWidget->setWindowFlags(Qt::WindowStaysOnTopHint); // menu widget is child of mainwidget(central Widget of main window) and is not in layout
menuWidget->raise();
frmWidget->setWindowFlags(Qt::WindowStaysOnBottomHint);
To copy to clipboard, switch view to plain text mode
EDIT: I'm able to bring it on top by adding the menubar at last. But the mouse move on the bottom widget isn't giving response to this to hide the menu widget, when out of the specified region.
Thank you.
Bookmarks