Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经使用QTableView和QStandardItem小部件创建了一个表。如何从中删除垂直标题QStandardItemModel?
QTableView
QStandardItem
QStandardItemModel
如果我说得对,并且您想隐藏标题,那么您应该使用标题的hide()方法:
hide()
QTableView * view = new QTableView(); view->verticalHeader()->hide();
不要忘记#include <QHeaderView>
#include <QHeaderView>