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. Table headers drawing issue
Forum Updated to NodeBB v4.3 + New Features

Table headers drawing issue

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 696 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.
  • DAnieD Offline
    DAnieD Offline
    DAnie
    wrote on last edited by
    #1

    Hi everyone,

    I have a table where the vertical header does not correctly redraw all the time.
    It is not repeatable a 100% but pretty consistently.

    Often, refreshing the underlying model causes it to break.

    Symptoms:

    • shows graphics artefacts of another tab in the tab view instead of the correct header data.
    • scrolling does not refresh the header
    • vertical header is unaffected

    Can someone point me to the part of QT where I should start looking?

    Thanks in advance!

    Best Regards,
    Daniel Fink

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

      Hi,

      Can you tell us a bit more what you are doing and what exactly is breaking ?
      As for poking around, the QHeaderView class seems the thing to look at.

      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
      • DAnieD Offline
        DAnieD Offline
        DAnie
        wrote on last edited by
        #3

        Hi again,

        I have two similar tableviews with varying heights of rows. They represent pivot tables.
        They were arranged in tabs but I moved them out into horizontal layouts to be viewable at the same time, for testing only.

        Ususally the second one is "broken" as you see in the black vertical bar instead of the numbered header view which should be there.
        The first one also breaks some time.

        It seems to depend on

        • the size of the table (number of nows and colums)
        • the time it was refreshed (refreshing the data again sometimes breaks it)

        I have not subclassed QHeaderView but I use the default one.

        broken_pivot_table.png

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          At what size do they break ?

          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
          • DAnieD Offline
            DAnieD Offline
            DAnie
            wrote on last edited by
            #5

            Hi,

            sorry for the late reply.
            What size are you referring to? Window size or size of one header row?

            Best Regards,
            Daniel

            1 Reply Last reply
            0
            • DAnieD Offline
              DAnieD Offline
              DAnie
              wrote on last edited by
              #6

              Another info,

              When I pull the tabs to a separate layout, so that they are visible from the beginning. I get a not 100% repeatable segfault in a QWidget::showChildren call at the moment the window should become visible

              1 Reply Last reply
              0
              • Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @DAnie said in Table headers drawing issue:

                segfault in a QWidget::showChildren

                What Qt version do you use? If it's 5.12.3 or 5.12.4 please update to 5.12.5

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                1
                • DAnieD Offline
                  DAnieD Offline
                  DAnie
                  wrote on last edited by
                  #8

                  I am actually using 4.8.7 on centos 6
                  I successfully switched to 5.9.8 but no later because of centos 6 having an older version of glibc

                  1 Reply Last reply
                  0
                  • DAnieD Offline
                    DAnieD Offline
                    DAnie
                    wrote on last edited by
                    #9

                    Hi again,

                    I was able to workaround this issue. It is not very pretty.
                    I added a recreation of QHeaderView for horizontal and vertical headers to each showEvent() call of the TableView
                    This fixes the display issues.
                    So it seems they get deleted in some way that I could not find out.

                    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