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. QTableWidget grid lines are misaligned

QTableWidget grid lines are misaligned

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.9k 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.
  • M Offline
    M Offline
    mfeemster
    wrote on last edited by
    #1

    It appears that the grid lines in a QTableWidget are shifted one pixel down from the lines of the vertical header cells. I need to know how to make them line up properly.

    Version: Qt 5.4 on Windows 7 x64

    Repro Steps:
    -Create a new form, and place a QTableWidget on it.
    -Add a few dummy rows and columns.
    -Enable showGrid.

    Look very closely where the vertical headers border the cells in the first column. The header lines are one pixel above the cell lines. I've linked a picture via Google Drive which highlights the problem.

    "Table Grid Lines":https://drive.google.com/file/d/0Bws5xPbHJph6ZzN2NGNwcUtOWUU/view?usp=sharing

    This is something that I've noticed for a couple of years. If it's not fixable, then I'll file a bug.

    Thanks.

    github.com/mfeemster/fractorium/wiki

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      i think it ever has been like this.
      This would need to be fixed in the painting code inside QStyle. But to be clear if there is maybe a reason for this you should ask this question on the "dev-mailinglist":lists.qt-project.org/mailman/listinfo/development.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mfeemster
        wrote on last edited by
        #3

        I figured I'd ask it here to see if it's the intended effect or if it's a bug, and if others have seen it, and maybe have a workaround for it.

        If not, I'll try the dev list. It just seems strange that something so blatantly obvious would be there for this long. I have a hard time believing I'm the only person who noticed that the grid lines are not aligned to the header cells.

        github.com/mfeemster/fractorium/wiki

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          well, some people may see it as intended since it adds an effect like the header widgets are raised above the view's content

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          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