qt - How to prevent user from resizing columns of QTableWidget? -



qt - How to prevent user from resizing columns of QTableWidget? -

i'd manage width of columns in table personally, after resizing them code, cannot figure out way prevent user resizing them manually. found out qtableview has columnresized() slot, , ways see either subclassing qtablewidget or resizing columns 1 time again , 1 time again on timer event.

might there easier way?

it can done using :

void qheaderview::setsectionresizemode (resizemode mode) void qheaderview::setsectionresizemode (int logicalindex, resizemode mode)

the horizontal header reachable qtablewidget using horizontalheader().

this it:

ui->tmeal->horizontalheader()->setsectionresizemode (qheaderview::fixed);

note legacy (qt4) applications should utilize setresizemode().

qt qtablewidget

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -