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. Strange header like boxes in front of every table row
Forum Updated to NodeBB v4.3 + New Features

Strange header like boxes in front of every table row

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 179 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.
  • S Offline
    S Offline
    sebastianzander
    wrote on 24 Jul 2024, 14:32 last edited by
    #1

    Hi,

    I already searched using different phrases and prompts but I could not find anyone else who already described the visual issue that I have with QTableView. This is why I am writing here in the hopes of someone that might know a simple solution to my issue.

    The issue is that I have strange boxes in front of every table row, but only if there are rows in the table. The boxes look kind of like the column headers. With their border they are only 2 pixels wide. However, it looks funky and I would rather not have these boxes there. Is there something analogous of column headers but for rows that is enabled by default? I did not configure that QTableView specially in this regard.

    Please find these two screenshots indicating the different appearances:

    strange_tableview_boxes_no_rows.png strange_tableview_boxes_rows.png

    Any help would be appreciated. Thanks

    Regards,
    Sebastian

    P A 2 Replies Last reply 24 Jul 2024, 15:04
    0
    • S sebastianzander
      24 Jul 2024, 14:32

      Hi,

      I already searched using different phrases and prompts but I could not find anyone else who already described the visual issue that I have with QTableView. This is why I am writing here in the hopes of someone that might know a simple solution to my issue.

      The issue is that I have strange boxes in front of every table row, but only if there are rows in the table. The boxes look kind of like the column headers. With their border they are only 2 pixels wide. However, it looks funky and I would rather not have these boxes there. Is there something analogous of column headers but for rows that is enabled by default? I did not configure that QTableView specially in this regard.

      Please find these two screenshots indicating the different appearances:

      strange_tableview_boxes_no_rows.png strange_tableview_boxes_rows.png

      Any help would be appreciated. Thanks

      Regards,
      Sebastian

      A Offline
      A Offline
      artwaw
      wrote on 24 Jul 2024, 15:12 last edited by
      #3

      @sebastianzander those are row headers. Empty and visible, since - like you said - not configured.

      Please try something along this line:
      ui->tableView->verticalHeader->setVisible(false);
      Alternatively if you dive into the design view you'll see in the inspector property "Vertical header visible" checked.

      For more information please re-read.

      Kind Regards,
      Artur

      1 Reply Last reply
      1
      • S sebastianzander
        24 Jul 2024, 14:32

        Hi,

        I already searched using different phrases and prompts but I could not find anyone else who already described the visual issue that I have with QTableView. This is why I am writing here in the hopes of someone that might know a simple solution to my issue.

        The issue is that I have strange boxes in front of every table row, but only if there are rows in the table. The boxes look kind of like the column headers. With their border they are only 2 pixels wide. However, it looks funky and I would rather not have these boxes there. Is there something analogous of column headers but for rows that is enabled by default? I did not configure that QTableView specially in this regard.

        Please find these two screenshots indicating the different appearances:

        strange_tableview_boxes_no_rows.png strange_tableview_boxes_rows.png

        Any help would be appreciated. Thanks

        Regards,
        Sebastian

        P Offline
        P Offline
        Pl45m4
        wrote on 24 Jul 2024, 15:04 last edited by
        #2

        @sebastianzander said in Strange header like boxes in front of every table row:

        I did not configure that QTableView specially in this regard.

        Please show how you add the data and what model is used.

        Your platform/system? Qt version?


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        S 1 Reply Last reply 25 Jul 2024, 06:26
        0
        • S sebastianzander
          24 Jul 2024, 14:32

          Hi,

          I already searched using different phrases and prompts but I could not find anyone else who already described the visual issue that I have with QTableView. This is why I am writing here in the hopes of someone that might know a simple solution to my issue.

          The issue is that I have strange boxes in front of every table row, but only if there are rows in the table. The boxes look kind of like the column headers. With their border they are only 2 pixels wide. However, it looks funky and I would rather not have these boxes there. Is there something analogous of column headers but for rows that is enabled by default? I did not configure that QTableView specially in this regard.

          Please find these two screenshots indicating the different appearances:

          strange_tableview_boxes_no_rows.png strange_tableview_boxes_rows.png

          Any help would be appreciated. Thanks

          Regards,
          Sebastian

          A Offline
          A Offline
          artwaw
          wrote on 24 Jul 2024, 15:12 last edited by
          #3

          @sebastianzander those are row headers. Empty and visible, since - like you said - not configured.

          Please try something along this line:
          ui->tableView->verticalHeader->setVisible(false);
          Alternatively if you dive into the design view you'll see in the inspector property "Vertical header visible" checked.

          For more information please re-read.

          Kind Regards,
          Artur

          1 Reply Last reply
          1
          • P Pl45m4
            24 Jul 2024, 15:04

            @sebastianzander said in Strange header like boxes in front of every table row:

            I did not configure that QTableView specially in this regard.

            Please show how you add the data and what model is used.

            Your platform/system? Qt version?

            S Offline
            S Offline
            sebastianzander
            wrote on 25 Jul 2024, 06:26 last edited by
            #4

            @artwaw said in Strange header like boxes in front of every table row:

            @sebastianzander those are row headers. Empty and visible, since - like you said - not configured.

            Please try something along this line:
            ui->tableView->verticalHeader->setVisible(false);
            Alternatively if you dive into the design view you'll see in the inspector property "Vertical header visible" checked.

            Thank you very much, Artur. You were right, the thing is that in our company we use a special class that inherits from QTableView and this class uses the vertical header to configure screen and DPI dependent row heights. I guess without those settings it would not even display those "strange boxes".

            Many windows in our software explicitly set verticalHeader->setVisible(false) or verticalHeader->hide() in their constructors, so it seemed odd to me that other tables do not have these vertical header boxes.

            I will suggest a change to our special QTableView descendant so that it calls verticalHeader->hide() in its constructor.

            @Pl45m4, thank you, too. I should have written that I use a descendant of QTableView, because so I (our company to be exact) indeed configure QTableView and QHeaderView specifically in this regard.

            Once again, many thanks to both of you for your quick replies and help.

            Kind regards,
            Sebastian

            1 Reply Last reply
            0
            • S sebastianzander has marked this topic as solved on 25 Jul 2024, 07:48

            1/4

            24 Jul 2024, 14:32

            • Login

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