Results 1 to 3 of 3

Thread: QTableview set columns maximun width

  1. #1
    Join Date
    Sep 2015
    Posts
    22
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Post QTableview set columns maximun width

    im trying to set a maximun width size for all columns in a qtableview but i can´t find anything in the documentation to make it possible....any ideas?

  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: QTableview set columns maximun width

    column width or row height are controlled by the respective header view, i.e. for columns that would be the horizontal header view, see QTableview::horizontalHeader().

    Cheers,
    _

  3. #3
    Join Date
    Sep 2015
    Posts
    22
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QTableview set columns maximun width

    thx man i got it all working with ui->tableView->horizontalHeader()->setMaximumSectionSize(int);

Similar Threads

  1. Replies: 6
    Last Post: 15th September 2015, 12:18
  2. Width QTableView for QCombobox with multiple columns
    By visor_ua in forum Qt Programming
    Replies: 7
    Last Post: 21st June 2011, 11:54
  3. Replies: 1
    Last Post: 13th August 2010, 07:28
  4. How to set QTableView width to width of horizontal header?
    By martinb0820 in forum Qt Programming
    Replies: 0
    Last Post: 2nd December 2008, 21:51
  5. set the width of the columns of QTableView
    By zhanglr in forum Qt Programming
    Replies: 6
    Last Post: 31st July 2008, 16:29

Tags for this Thread

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.