Results 1 to 3 of 3

Thread: how to change QTableView column width?

  1. #1
    Join Date
    Apr 2016
    Posts
    37
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default how to change QTableView column width?

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to change QTableView column width?

    How do you attempt to change the widths?

    Cheers,
    _

  3. #3
    Join Date
    Apr 2016
    Posts
    37
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to change QTableView column width?

    dragging header of midline . i see QHeaderView Moving Header Sections in doc.

Similar Threads

  1. Replies: 1
    Last Post: 8th May 2013, 03:02
  2. Handle QTableWidget's column width change
    By dorians58 in forum Newbie
    Replies: 0
    Last Post: 28th July 2010, 19:24
  3. Replies: 5
    Last Post: 26th April 2010, 06:59
  4. Column width sensitive kerning in QTableView
    By Debilski in forum Qt Programming
    Replies: 2
    Last Post: 22nd October 2009, 19:11
  5. Change column width in a QTreeWidget
    By mace in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2006, 12:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.