Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTableView different default column sizes
Qt 6.11 is out! See what's new in the release blog

QTableView different default column sizes

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 891 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tikani
    wrote on last edited by Tikani
    #1

    How to set a different default size for each separate column in a QTableView? I've found a method (QTableViewInstance->horizontalHeader()->setDefaultSectionSize(x)) but it makes equal default sizes.

    1 Reply Last reply
    0
    • artwawA Offline
      artwawA Offline
      artwaw
      wrote on last edited by
      #2

      Hi. You should use resizeSection() method of QHeaderView.

      For more information please re-read.

      Kind Regards,
      Artur

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved