QT工具栏图标设置
来源:互联网 发布:oracle数据库基础 编辑:程序博客网 时间:2024/05/21 14:57
1、定义一个QAction对象,设置显示图标和文字;
2、定义一个QToolBar对象;
3、将QAction对象添加到QToolBar对象中;
4、将QToolBar对象添加到待显示的窗口中;
5、设置工具栏的显示方式。
QMainWindow *w = new QMainWindow;
QAction *saveAct = new QAction(QIcon(":save.png"),QObject::tr("Save(&S)", "保存(&S)"), w);
QToolBar *toolbar = new QToolBar(w);
toolbar->addAction(saveAct);
w->addToolBar(toolbar);
toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
w->show();
- QT工具栏图标设置
- 如何设置大图标工具栏
- QT界面中工具栏图标无法显示
- 设置工具栏图标背景颜色为透明
- Pb菜单工具栏图标顺序的设置
- 设置Qt应用程序图标
- 设置Qt应用程序图标
- 设置Qt应用程序图标
- 设置Qt应用程序图标
- 设置Qt程序图标
- 设置Qt应用程序图标
- 设置Qt应用程序图标
- 设置Qt应用程序图标
- 设置Qt应用程序图标
- 设置Qt应用程序图标
- Qt 设置应用程序图标
- Qt编程图标设置
- 设置Qt应用程序图标
- XMPP协议实现原理介绍
- Building Coder(Revit 二次开发) - GetInstanceGeometry() 的开销和无效的引用
- Qt中文化方法
- 初识XML(一)
- HashSet中加入自定义的类的对象,不重复加入自定义
- QT工具栏图标设置
- QT带有主创窗口应用程序的创建
- Ajax学习(三),对GET方式或者URL传送中文时的乱码解决
- Excel VBA真正的动态数组实例
- windows下察看程序中包含的库的方法
- VC—>add files to folder失效
- 8259a中断控制器
- Big Data Counting: How To Count A Billion Distinct Objects Using Only 1.5KB Of Memory
- WinForm与WPF互操作,在WPF的TextBox中无法输入文字