April 29, 2012

pascal95abc pascal95abc
Lab Rat
121 posts

how to create slot for QMenu.clicked

 

Hello,

I want to run some code when QMenu is clicked, not its child QAction.

How to do that`?

 Signature 

Qt 4.7.3
Symbian OS v9.4 / Symbian^1, S60 5th Edition
on N97

3 replies

April 29, 2012

task_struct task_struct
Hobby Entomologist
344 posts

Hello,

QMenu has signal triggered [qt-project.org] I think this is what you are looking for.

 Signature 

“Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.”
- Linus Torvalds

April 29, 2012

ZapB ZapB
Robot Herder
1356 posts

Is it QMenuBar::triggered() you are after? If you really mean QMenu, then what is the problem with using QAction?

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

April 30, 2012

pascal95abc pascal95abc
Lab Rat
121 posts

I want to use QMenu but I don’t want that it has a submenu.
So, I have a QMenuBar and many QMenus. These QMenus don’t have submenus QAction, I have already tried with submenus and their triggered signal but howto edit these signals in the Designer, I can’t right click on the QMenu, but only on the submenu and edit their signals.

This is how it looks like:
QMenu

I don’t want these QActions but more QMenus.

 Signature 

Qt 4.7.3
Symbian OS v9.4 / Symbian^1, S60 5th Edition
on N97

 
  ‹‹ [SOlved] include resourcesin a sis package      test to symbian device ››

You must log in to post a reply. Not a member yet? Register here!