[Qt-interest] Dynamic Morph

Ross Bencina rossb-lists at audiomulch.com
Sat May 14 12:00:09 CEST 2011


> I've complicated menu in my UI and I don't
> want to recreate them manually so I just want
> to morph (convert) created QMenuBar to QToolBar at runtime.

Each QMenu has an associated QActions. This is traversable via 
QMenu::actions()

You could write a loop that traverses all menus and adds each of their 
actions to a toolbar using QToolBar::addAction()

Ross.










More information about the Qt-interest-old mailing list