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. [SOLVED]How to increase/decrease the column height and width in QTableWidget

[SOLVED]How to increase/decrease the column height and width in QTableWidget

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.2k 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.
  • P Offline
    P Offline
    prabuqt
    wrote on last edited by
    #1

    Hi everyone,
    is it possible to set the size of column width or row height in QTablewidget? I tried it in many ways but I am unable to find the solution.
    Please help me.
    Thank you.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      butterface
      wrote on last edited by
      #2

      You can try to use horizontalHeaderDefaultSectionSize and verticalHeaderDefaultSectionSize if you want to have the same size for every column and row. Otherwise the QTableWidgetItem can have a size hint.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prabuqt
        wrote on last edited by
        #3

        Thank you very much. I got it.

        1 Reply Last reply
        0

        • Login

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