Hi,
On 25 nov. 09, at 06:38, siva prasad wrote:
Hi all,
In TeXmacs, There are some actions which have popup menu. I want the
menu associated with that action. I want to have the list of actions
in that menu.
I did like this :
Let "action" has some popup menu asociated.
QMenu *menu = action -> menu();
QList<QAction *> list = menu -> actions();
But " list.count() " is always returning ZERO ( 0 ) for all
actions (those have popup menu also).
I want list of actions present in that popup menu.
How can I do ?
please help me if you know . . . .
most of the TeXmacs menus are "lazy", i.e. they are build only when
needed. So if you look at the submenu actions you will obtain 0.
You need to dynamically cast the QMenu to QTMLazyMenu and use force()
to build the list of actions before inspecting the menu.
Keep in mind that menu customization is done in scheme so I do not
guarantee that if you programmatically change the menus in the C++
code this will work.
best
massimiliano
thank you in advance,
siva.
[email protected]
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev