QColumnView使用
来源:互联网 发布:香蕉免费网络电视 编辑:程序博客网 时间:2024/06/05 16:40
原文:http://stackoverflow.com/questions/3611195/how-to-use-qcolumnview-to-display-multiple-columns-of-data
#include <QtGui>int main(int argc, char **argv){ QApplication app(argc, argv); QMainWindow win; QColumnView *cview = new QColumnView; win.setCentralWidget(cview); /* Create the data model */ QStandardItemModel model; for (int groupnum = 0; groupnum < 3 ; ++groupnum) { /* Create the phone groups as QStandardItems */ QStandardItem *group = new QStandardItem(QString("Group %1").arg(groupnum)); /* Append to each group 5 person as children */ for (int personnum = 0; personnum < 5 ; ++personnum) { QStandardItem *child = new QStandardItem(QString("Person %1 (group %2)").arg(personnum).arg(groupnum)); /* the appendRow function appends the child as new row */ group->appendRow(child); } /* append group as new row to the model. model takes the ownership of the item */ model.appendRow(group); } cview->setModel(&model); win.show(); return app.exec();}
- QColumnView使用
- QStandardItemModel(QColumnView)小总结
- 使用
- 使用
- 使用
- 使用
- 使用
- 使用
- 使用++,--
- 使用$@ $!
- 使用
- SoftICE使用(指令使用)
- 使用GraphEdit使用
- 使用HtmlParser使用心得
- 时钟使用使用
- Ubuntu 使用Git 使用
- Ubuntu 使用Git 使用
- GUID使用的使用
- Android标题栏各种设置
- CMD命令积累(一)
- android json 解析 简单示例
- [转载]Treap
- 珍重了,我亲爱的朋友们
- QColumnView使用
- Python装饰器与面向切面编程
- 国庆,几家欢喜几家愁
- Luence filter 缓存分析
- WebLogic环境下WebService开发过程
- Oracle 12C 简介
- codeblock 编译ffmpeg中链接库的问题
- Linux的启动流程
- Poj1258_Agri-Net(最小生成树)