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 189 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.
  • sebastianzanderS Offline
    sebastianzanderS Offline
    sebastianzander
    wrote on 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

    Pl45m4P artwawA 2 Replies Last reply
    0
    • sebastianzanderS sebastianzander

      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

      artwawA Offline
      artwawA Offline
      artwaw
      wrote on 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
      • sebastianzanderS sebastianzander

        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

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on 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

        sebastianzanderS 1 Reply Last reply
        0
        • sebastianzanderS sebastianzander

          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

          artwawA Offline
          artwawA Offline
          artwaw
          wrote on 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
          • Pl45m4P Pl45m4

            @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?

            sebastianzanderS Offline
            sebastianzanderS Offline
            sebastianzander
            wrote on 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
            • sebastianzanderS sebastianzander has marked this topic as solved on

            • Login

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