[Qt-interest] Can I read toolbar actions one by one?

R. Reucher rene.reucher at batcom-it.net
Wed Sep 9 10:21:34 CEST 2009


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...

HTH, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/




More information about the Qt-interest-old mailing list