• 11134阅读
  • 3回复

QToolBar,QToolButton这些怎么用designer4来添加啊~??? [复制链接]

上一主题 下一主题
离线jollyjia
 

只看楼主 倒序阅读 楼主  发表于: 2006-05-15
高手指点,谢谢啊~~!
[ 此贴被XChinux在2006-05-15 18:58重新编辑 ]
离线mqguodong
只看该作者 1楼 发表于: 2009-09-19
帮顶,我也想知道
离线tears1134

只看该作者 2楼 发表于: 2010-06-19
搜好久才搜到,分享一下:)
Creating a QToolbar in QT Designer
Posted by Ludovico Fischer on May 22, 2010

Adding the QToolbar to a QMainWindow
In QT Designer (version 4.6.2) to add a toolbar to your main window, do not look in the widget list. Instead right-click on the main window and select Add toolbar from the context menu. To add buttons to the toolbar, you must create some QActions. To do this, select the Action Editor tab (if the tab is nowhere to be seen, go to the view menu and make sure Action Editor is checked), push the create new action button and fill the form that appears. Then drag your newly created action from the list in the action editor to the toolbar.

Adding separators
To add a separator, click on a button (QAction) you just created and select Add separator before… Do not select Append separator, as if you do, QT Designer will append a separator to the end of the toolbar, not the button.

Remember that toolbars can only be created on main windows (QMainWindow class).
明天会更好!
离线0354030w

只看该作者 3楼 发表于: 2010-06-19
我试了一下不管用哇!在主窗口中右键,没有Add toolbar from the context menu这个选项啊!楼主指导一下!
快速回复
限100 字节
 
上一个 下一个