PDA

View Full Version : Get the actions from a toolbar



jano_alex_es
19th May 2009, 17:05
Hi,

I'd like to enable or disable some actions in the toolbar in execution time.

In order to do that, I saw that QToolBar just let us get the actions if I use a function with the position of the action... it doesn't seem to be what I'm looking for so I saw it obtains a list with all the actions with "actions()" (from QWidget), cool.

But when I call the function it doesn't send me back anything.

It's that the proper way to access to the actions in a qtoolbar? do I have any other way?

thanks!

wysota
19th May 2009, 19:57
How did you place them in the toolbar?

jano_alex_es
20th May 2009, 08:27
adding them from the actions window in the Visual Studio integrator.

Yep, you are right, thanks to that I realized I can access to the actions directly from the ui object. They aren't implemented inside the toolbar, they are as widgets.

wysota
20th May 2009, 09:02
Yep, you are right, thanks to that I realized I can access to the actions directly from the ui object.

Exactly :)