I create a mainwindow by inheriting QMainWindow,and on the left of the mainwindow,I create a tree throw the following code,
Qt Code:
  1. QTreeWidget *projecttree=new QTreeWidget();
  2. ...
  3. QDockWidget *dock=new QDockWidget (tr("project"),this);
  4. dock->setWidget(projecttree);
  5. addDockWidnget(Qt::LeftDockWidgetArea,dock);
To copy to clipboard, switch view to plain text mode 

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?