QMenu opens first time off screen
-
Hello,
I have a QMenu that is loaded from a model. It is used very much like the older Windows Start button. When I click my QPushButton the menu appears above it. This works perfectly. But when I go to the top of the menu and mouse over "Programs" which opens a sub-menu to the right. The new sub-menu opens but is positioned too low. The bottom of it goes over the task bar and a little bit off the screen. If I move my mouse and then hover over "Programs" again, the sub-menu positions itself correctly.I have searched long and wide and cannot find a resolution for this. Can someone please shed some light on this for me?
-
Hi and welcome to devnet,
What version of Qt are you using ? On which OS ?
Can you provide a minimal compilable example that reproduces this ?
-
Hi,
I'm on RHEL 6 and QT 4. I cannot really post the code as I would have to post my whole application. And I do not know what specific code controls the position of the menu. (thus my question).Thanks for the help.
-
That's one of the reason of making a minimal example. You can put in it just the part that create the QMenu and test it there
-
I really just need to know if someone has had this same problem and what they did to fix it.
Or, what the method/property is on the menu to check/set the starting position.