[英]Fitting columns in QTableView
在我的TableModel中,我有兩列。 此模型連接到TableView。 我如何設置它們以便這兩列填充tableView所以沒有可用空間?
編輯:
嘗試這個:
tableView->horizontalHeader()->setStretchLastSection(true);
tableView->resizeColumnsToContents(); // not necessarily but can make look better
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.