Reputation: 616
I am developing a windowed application with Qt, C++ on embedded Linux. Using QApplication type of QApplication::GUIServer
I am trying to disable the context menu that pops up when user right clicks on application title area, the one that gives the options to resize, move, close, etc. the application.
I already tried setting ContextMenuPolicy to PreventContextMenu on main window and giving a custom context menu handler to main window.
Thanks in advance.
Upvotes: 3
Views: 2194
Reputation: 61
Try this: setWindowFlags( Qt::FramelessWindowHint | Qt::WindowTitleHint );
Upvotes: 0
Reputation: 4276
This is a system menu, normally handled by your Windows Manager. All QT can do is to hint the Window Manager to enable/disable some of its features.
You should check QWidget::setWindowFlags ( Qt::WindowFlags type )
, maybe the Qt::WindowSystemMenuHint
flag.
Upvotes: 0
Reputation: 8157
You may not be able to disable this menu as this is provided by the window manager, not the application.
The only option may be to request the title bar is removed with windowFlags
.
Upvotes: 2