ui.setupUi(this); //Init model. m_pModel = new WatchDogModel(this); //Set model to view. ui.treeView_WatchDog->setModel(m_pModel); //Resize columns ui.treeView_WatchDog->setColumnWidth(0, 135); ui.treeView_WatchDog->setColumnWidth(1, 135); ui.treeView_WatchDog->setColumnWidth(2, 200);