Remove actions options menu in Symbian

From Qt Wiki
Revision as of 11:27, 24 February 2015 by Maintenance script (talk | contribs)
Jump to navigation Jump to search


English Български

Remove actions option menu in Symbian

The Problem

Sometimes Actions option is added automatically to the Options menu of Qt applications for Symbian.

Solutions

Using Qt Designer

This article describes how to remove the strange Actions option which keeps appearing on Qt application running on Symbian.

  1. Go to the Qt Designer (you can do this in the code as well)
  2. Select every Widget in your form
  3. In the properties pane find contextMenuPolicy and change it to NoContextMenu for every widget inside your form (could be a QWidget, QDialog or a QMainWindow).
  4. See the screenshot below

pic

Programatically

Another way to solve the issue is to set NoContextMenu to all widgets using the code below:


QWidgetList allWidgets = QApplication::allWidgets();
foreach(QWidget* widget, allWidgets)
widget->setContextMenuPolicy(Qt::NoContextMenu);