PDA

View Full Version : how to change QTableView column width?



tiaoweiliao
19th May 2016, 15:24
hi , all.

i have a table.

name | sex | age | job
li man 22 no job

i want change table column width by '|'.

but , i don't hope table width change , besides "name" and "job" column width no change.

e.g. "name" wdith 10 , "sex" width is 20 , "age" width is 20 , "job" width is 10 .

i change "sex" column width to add 10 , "sex" width is 30 , "age" width is 10 , other unchanged.

I hope your can understand them , This problem had disterbed me so long time.

anda_skoa
19th May 2016, 18:35
How do you attempt to change the widths?

Cheers,
_

tiaoweiliao
20th May 2016, 05:45
dragging header of midline . i see QHeaderView Moving Header Sections (http://doc.qt.io/qt-5/qheaderview.html) in doc.