Remove actions options menu in Symbian: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(Mark Outdated: Symbian no longer supported)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Outdated|reason=The Symbian platform is no longer supported.}}
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}
[[Category:HowTo]]
[[Category:HowTo]]


Line 26: Line 29:
Another way to solve the issue is to set '''NoContextMenu''' to all widgets using the code below:
Another way to solve the issue is to set '''NoContextMenu''' to all widgets using the code below:


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

Latest revision as of 15:18, 19 March 2015

IMPORTANT: The content of this page is outdated. Reason: The Symbian platform is no longer supported.
If you have checked or updated this page and found the content to be suitable, please remove this notice.
This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

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);