Interactions with the main menu bar (Gnome or Unity)

Last edited on

Symptoms

On some desktop managers such as Gnome or Unity, which try to give you a MacOS style main menu bar, the QMenuBar is hidden and a completely different menu is dynamically generated and drawn using the desktop's native routines, and rendered at the top of the desktop. This means Qt is not drawing the QMenuBar at all, and this may cause Squish to have problems recording or spying on it - it might not even appear as that class anymore in recordings.

Solutions

It is suggested that you disable the main menubar behavior in Gnome or whatever window manager you are using, or record/playback using keyboard shortcuts / accelerators, or switch to a different window manager that does not have this behavior (such as KDE). Another idea is to dynamically invoke the menus from script code.