8
我爲有同樣的問題的標題文字:設置一個QTreeView則頭
What is the method to set the text for a QTreeWidget's header?
有一點不同:我使用一個TreeView,而不是樹部件,所以答案有沒有幫助。
我在文檔中找不到任何說明。
所以 - 如何設置QTreeView的標題文本?
我爲有同樣的問題的標題文字:設置一個QTreeView則頭
What is the method to set the text for a QTreeWidget's header?
有一點不同:我使用一個TreeView,而不是樹部件,所以答案有沒有幫助。
我在文檔中找不到任何說明。
所以 - 如何設置QTreeView的標題文本?
它可能會在您的模型類中完成,可能會繼承QStandardItemModel。
通常情況下,你會打電話:
QStandardItemModel::setHorizontalHeaderLabels (const QStringList & labels)
只能用於文本,或
QStandardItemModel::setHorizontalHeaderItem (int column, QStandardItem * item)
如果需要在標題中的項目更多的定製。