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. Empty QTableWidget vertical header visibility

Empty QTableWidget vertical header visibility

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 992 Views 2 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.
  • C Offline
    C Offline
    ConnectingPpl
    wrote on last edited by
    #1

    How to make QTableWidget vertical header is always visible, even if the table is empty? Frequent show / hide this header annoying users

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      The header is part of the items you add so there is none when its empty
      setHorizontalHeaderItem(0, new QTableWidgetItem("Prueba"));
      horizontalHeaderItem(0)->setText("Whatever");

      So to make it look the same even when no data, you should add the header items.

      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