QTreeWidget* pTree = ui.TreeCheckList; QTreeWidgetItem* item = new QTreeWidgetItem(pTree) ; item->setText ( 0, "test" ); pTree->addTopLevelItem (item );
緣由是由於建立一個item的時候必定要用new的方式才行ui