i need one column of my QTableView object to stretch to its contents, while the height of every row is fixed.
simply put, i want all text in column 1 be fully displayed in only one row, no word wrap, no ellipsis.
i tried
m_tableView->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
m_tableView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
but the above codes sometimes work while sometimes don't work(with ellipsis at the right most).
FYI, when the text is displayed with ellipsis and i drag any section slightly a little larger or smaller, ellipsis in column 1 will suddenly disappear and column 1 is auto-stretched to the text.
i respect any response, thank you!
Bookmarks