PDA

View Full Version : simple question,set width of QTreewidget or QDockWidget



weixj2003ld
17th May 2010, 01:52
I create a mainwindow by inheriting QMainWindow,and on the left of the mainwindow,I create a tree throw the following code,


QTreeWidget *projecttree=new QTreeWidget();
...
QDockWidget *dock=new QDockWidget (tr("project"),this);
dock->setWidget(projecttree);
addDockWidnget(Qt::LeftDockWidgetArea,dock);


When I run my program.I find that the initial width of projectree is large, how to change it or how to set the initial width?