在使用QTableWidget有时候遇到setText没有起作用, 那就使用Item = new QTableWidgetItem(strText);就可以了 不知道Item->setText(strText)为什么没有效果