设置前:
设置后:
步骤:
一:打开mainwindow.cpp
二:引用头文件#include <QStyleFactory>
三:在ui->setupUi(this);后面添加ui->treeWidget_2->setStyle(QStyleFactory::create("windows"));
ps:treeWidget_2自行替换成需要设置的objectName
#include <QStyleFactory>
ui->treeWidget_4->setStyle(QStyleFactory::create("windows")); //treeWidget_4自行替换成需要设置的objectName