LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1935|回复: 3

请问在qt中如何向toolbar中加上一个widgets?

[复制链接]
发表于 2004-4-19 11:59:56 | 显示全部楼层 |阅读模式
我按照qt自带的教程一步一步做
当作到在toolbar中加上一个widgets,是combobox时,
发现combox不能正常显示,即在toolbar中看不到它。
请问这是问什么?
Although you can put any widget into a toolbar we recommend that widgets which can be associated with an action should not be added to the toolbar directly. For these widgets, i.e. menu items, toolbar buttons and lists of items, you should create an action (drop down action for a list of items), associate the action with the widget, and add the action to the toolbar. Widgets that can sensibly be inserted directly into a toolbar are ComboBoxes, SpinBoxes and Line Edits.
这里面不是说了combobox是可以直接加的吗?
谢谢了!
发表于 2004-4-19 21:40:12 | 显示全部楼层
你自己好好查查字典,看看sensibly是什么意思!
发表于 2004-4-21 15:06:50 | 显示全部楼层

let toolbar be the parent widget of combobox

QComboBox * combo = new QComboBox( toolbar );
发表于 2008-6-3 15:21:36 | 显示全部楼层
楼上的使用程序添加的,我也遇到同样的问题了。还是没添加上,请问怎么弄得啊?
都两天了,就是没弄出来,都懵了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表