[Qt-interest] Can I read toolbar actions one by one?
Girish Ramakrishnan
girish at forwardbias.in
Wed Sep 9 12:07:42 CEST 2009
R. Reucher wrote:
> Santhosh Y wrote:
>> I am trying to append a toolbar to the top level toolbar.
>> If I get a QToolBar from outside, can I read the actions added to the
>> toolbar?
> What do you mean by "outside"?
>
>> I have seen the QToolBar class, it seems to me that I can't read the
>> actions associated with a toolbar.
>> Am I correct?
> Basically, yes. But you may be able to gather the QToolBar's children like so:
>
> QList<QAction *> allActions = toolbar->findChildren<QAction *>();
>
> Never tried this myself...
It's even simpler, toolbar->actions() :-) (from QWidget)
Girish
More information about the Qt-interest-old
mailing list