Creating a menu
I’m trying to create a menu, so I tried this.
- ui->setupUi(this);
- //Creating actions
- connect(insert, SIGNAL(triggered()), this, SLOT(on_InsertButton_clicked()));
- connect(detect, SIGNAL(triggered()), this, SLOT(on_DetectButton_clicked()));
- connect(about, SIGNAL(triggered()), this, SLOT(on_AboutPushButton_clicked()));
- //Creating menu
- eyemenu->addAction(insert);
- eyemenu->addAction(detect);
- eyemenu->addSeparator();
- eyemenu->addAction(about);
But, nothing show up on the left side of the menu on Symbian. Just the right ‘Exit’ button.
Is there any mistake on this? Thanks.
8 replies
I don’t know if it’s a bug or a feature but the steps for removing the actions option are:
- Go to the Qt Designer (you can do this in the code as well)
- Select every Widget in your form
- 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).
- See the screenshot below

I don’t know if it’s a bug or a feature but the steps for removing the actions option are:
- Go to the Qt Designer (you can do this in the code as well)
- Select every Widget in your form
- 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).
- See the screenshot below
That’s great :)
We have also a wiki page for this. I will improve it in the near future: http://developer.qt.nokia.com/wiki/Remove_actions_options_menu_in_Symbian [developer.qt.nokia.com]
You must log in to post a reply. Not a member yet? Register here!


