[Qt-interest] using designer to add menu to toolbar

donglongchao donglongchao at 163.com
Mon Nov 23 15:56:50 CET 2009






在2009-11-23,"Duane Hebert" spoo at flarn.com>  写道:
>>It is easy,but not easy to find.:-)
>>On your Qt designer,click the Action Edit tab page(it is at right-bottom,together with signal/slot Edit) and
>>choose any Action you need and drag-drop it on the tool bar.That is all.
>
>Thanks for the reply but I'm not trying to add an action to a toolbar.(actually in the vs integration,
>the action editor is on the qt menu in VS)
>
>I'm trying to add a QMenu to toolbar.  I can do it manually by creating a QMenu and assigning its menuAction to the toolbar and this 
>works as I want but
>the "button" on the toolbar doesn't show up until runtime.  I'd like to have it show up at design time for other developers to see.

Just try it.I think what I said and what you need are exactly the same one.Actualy I do not think we can add a QMenu to toolbar,but only menuAction.Of course we can not see them until run-time because you create them when the app runs ,not when you design them.
Lonchao
>在2009-11-19,"Duane Hebert" <spoo at flarn.com> 写道:
>>I have a tool bar with some actions built in designer.  I want to add a drop down menu to the toolbar.  I can do this manually by
>>building a QMenu and using QMenu::menuAction() to add it to the tool bar.  This works as expected.
>>
>>But I would like to do this from designer so that it shows up when modifying this gui from designer.  Is this possible?
>>I'm using Qt4.5.1 on windows with VS integration.
>>
>>_______________________________________________
>>Qt-interest mailing list
>>Qt-interest at trolltech.com
>>http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
>
>
>看陆川杨幂新片《琴棋书画》,品网易3D国韵网游《天下贰》
>
>
>
>看陆川杨幂新片《琴棋书画》,品网易3D国韵网游《天下贰》 
>
>_______________________________________________
>Qt-interest mailing list
>Qt-interest at trolltech.com
>http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091123/54fe921c/attachment.html 


More information about the Qt-interest-old mailing list