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. Not enough space in Horizontal Header?
QtWS25 Last Chance

Not enough space in Horizontal Header?

Scheduled Pinned Locked Moved Solved General and Desktop
qtableview
4 Posts 3 Posters 541 Views
  • 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.
  • F Offline
    F Offline
    firen
    wrote on 2 Sept 2021, 17:11 last edited by firen 9 Feb 2021, 17:12
    #1

    Hi,

    I have a QT3-Table which I rewrite with Qt5 QTableView.

    Header.png

    On the picture on the top is Qt5 and bottom is Qt3.
    As you can see in my Qt5-Version the "g" is not full visible but the height of both horizontal headers is the same. And in both cases the Alignment is "AlignVCenter".
    So why is he doing that, are there more important configurations?

    Thanks!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 Sept 2021, 17:51 last edited by
      #2

      Hi,

      Which exact version of Qt 5 ?
      On which platform ?

      Can you provide a minimal compilable example that shows that behaviour ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 2 Sept 2021, 17:52 last edited by
        #3

        Hi

        Are you using any stylesheets?
        It could be from that.

        1 Reply Last reply
        1
        • F Offline
          F Offline
          firen
          wrote on 30 Sept 2021, 13:16 last edited by
          #4

          I fixed it with:

          setStyleSheet("QHeaderView::section{ padding-left: 4px; padding-top: 1; padding-bottom: 1; }");
          
          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