在我的Qt項目中,我的對話框中有表格視圖,我使用代理模型和表模型 從SQL設置其數據庫。現在我想改變我的表格視圖列的顏色[只列[3,4,5]。 搜索互聯網後,終於我成功地改變了顏色,但整個表視圖的顏色。我正在使用下面的代碼:Qt TableView與StyleSheet
ui->tableView->setStyleSheet("background-color: yellow");
我應該寫什麼來使黃色,只有一些列?
我想我應該改變「背景顏色」的東西,但我不是很擅長CSS,我不知道要搜索什麼。
感謝所有的幫助,但沒有任何作品,我試過你的建議。我甚至沒有在我的intellisense中使用 - > item()函數。 – user2521257
使用文檔.. – PersianGulf