Qt 设置QTreeWidget的列宽

时间:2020-09-24 22:06:29   收藏:0   阅读:54
1 tree = new QTreeWidget(this);  
2 
3 this->setSelectionMode(QAbstractItemView::ExtendedSelection);
4 
5 tree->setColumnCount(2);
6 
7 this->setColumnWidth(0, 100);  //设置列宽
8 
9 this->setColumnWidth(1, 300); 

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!