How to lock the headviewer width of the qtablewidget
-
I want to lock the first column of the tablewidget ,so that nobody could resize the width of the first column in the tablewidget,But other columns width could be resized by the users .So how to solve this problem?Is there any way that I could lock some columns width sets?
Heres the code I used dosent work...... case eCompTableItemDate:{ setColumnWidth(colId,240); } break; case eCompTableItemSize:{ setColumnWidth(colId,150); }
-
I want to lock the first column of the tablewidget ,so that nobody could resize the width of the first column in the tablewidget,But other columns width could be resized by the users .So how to solve this problem?Is there any way that I could lock some columns width sets?
Heres the code I used dosent work...... case eCompTableItemDate:{ setColumnWidth(colId,240); } break; case eCompTableItemSize:{ setColumnWidth(colId,150); }
@nicker-player
I would guesstableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Fixed)
? -
@nicker-player
I would guesstableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Fixed)
?@JonB
yeah,bingo. -
S SGaist has marked this topic as solved on