Results 1 to 2 of 2

Thread: [QTableWidget] Columns sizes

  1. #1
    Join Date
    Jan 2009
    Posts
    51
    Thanks
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default [QTableWidget] Columns sizes

    I change columns sizes by this way:
    Qt Code:
    1. ui->tableWidget->setColumnWidth(number, width);
    To copy to clipboard, switch view to plain text mode 
    but how can I set this width in qt designer?
    horizontalHeaderDefaultSectionSize doesn't work.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [QTableWidget] Columns sizes

    horizontalHeaderDefaultSectionSize works for all the columns...
    If you have to set individual col size, you will need to use setColumnWidth...
    It also makes sense, because Designer is to help you create a base gui. You want something specific, you need to code. Designer is not for replacing code I guess

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.