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. QTreeWidget - Header always invisible
QtWS25 Last Chance

QTreeWidget - Header always invisible

Scheduled Pinned Locked Moved Solved General and Desktop
qtreewidget
13 Posts 2 Posters 4.9k 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.
  • S SGaist
    17 Feb 2016, 07:54

    Hi,

    Did you configure your QTreeWidgets with rows and columns ?

    A Offline
    A Offline
    Andy314
    wrote on 17 Feb 2016, 07:55 last edited by
    #3

    Yes !

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 17 Feb 2016, 07:56 last edited by
      #4

      Can you show how ?

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

      A 1 Reply Last reply 17 Feb 2016, 08:29
      0
      • S SGaist
        17 Feb 2016, 07:56

        Can you show how ?

        A Offline
        A Offline
        Andy314
        wrote on 17 Feb 2016, 08:29 last edited by Andy314
        #5

        I have configured it with the pure designer - no code behind.

        It seem to be a bug, because I found the following:
        Disabling the header visible property disables it for ever. No effect by enabling it again.
        (The preview shows no columns too, now.)

        Second bug: Changing the font changes only the row height of the data not of the headers.

        and an other question: How can I change the width of the columns during design time?

        A 1 Reply Last reply 17 Feb 2016, 08:42
        0
        • A Andy314
          17 Feb 2016, 08:29

          I have configured it with the pure designer - no code behind.

          It seem to be a bug, because I found the following:
          Disabling the header visible property disables it for ever. No effect by enabling it again.
          (The preview shows no columns too, now.)

          Second bug: Changing the font changes only the row height of the data not of the headers.

          and an other question: How can I change the width of the columns during design time?

          A Offline
          A Offline
          Andy314
          wrote on 17 Feb 2016, 08:42 last edited by Andy314
          #6

          I found something more.
          It seems the setHeaderVisible(true) function has a bug. It updates not correct.
          The "set to default" which is the true value, triggered by the default button in the property explorer works.

          Maybe it has to do with the opposite value of the QTreeView branch headerHidden.
          Here works the switching.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 17 Feb 2016, 22:05 last edited by
            #7

            Did you add some data to your QTreeWidget ?

            I don't remember if it's possible to change the width at design time.

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

            A 1 Reply Last reply 18 Feb 2016, 07:49
            0
            • S SGaist
              17 Feb 2016, 22:05

              Did you add some data to your QTreeWidget ?

              I don't remember if it's possible to change the width at design time.

              A Offline
              A Offline
              Andy314
              wrote on 18 Feb 2016, 07:49 last edited by
              #8

              Yes, I added some demo rows with the designer.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 18 Feb 2016, 20:44 last edited by
                #9

                Can you share somewhere your project to make it possible to test it ?

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

                A 1 Reply Last reply 19 Feb 2016, 07:10
                0
                • S SGaist
                  18 Feb 2016, 20:44

                  Can you share somewhere your project to make it possible to test it ?

                  A Offline
                  A Offline
                  Andy314
                  wrote on 19 Feb 2016, 07:10 last edited by
                  #10

                  I use Creator 3.5.4 MSVC 5.5.1 32-bit
                  There is nothing special in my project, but when you cannot reproduce it I will send it.
                  Produce the bug:
                  Put a QTreeWidget on a dialog. The designer shows the columnname "1". The preview shows the same.
                  Disable and reenable the headerVisible: The designer shows the header but the preview and the running program not !
                  Click on the default Button for headerVisible: all works again.
                  (The effect in independent of the count of items in the view.)

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 20 Feb 2016, 22:22 last edited by
                    #11

                    Can you test that again with Qt 5.6 Beta/RC ?

                    I just tried following your instructions (on OS X with a more recent build of Qt) and it didn't misbehave.

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

                    A 2 Replies Last reply 21 Feb 2016, 19:39
                    0
                    • S SGaist
                      20 Feb 2016, 22:22

                      Can you test that again with Qt 5.6 Beta/RC ?

                      I just tried following your instructions (on OS X with a more recent build of Qt) and it didn't misbehave.

                      A Offline
                      A Offline
                      Andy314
                      wrote on 21 Feb 2016, 19:39 last edited by
                      #12

                      Ok, it seem to be fixed !? I will test it if I have time. In the moment I am a little bit in stress with my current project.

                      1 Reply Last reply
                      0
                      • S SGaist
                        20 Feb 2016, 22:22

                        Can you test that again with Qt 5.6 Beta/RC ?

                        I just tried following your instructions (on OS X with a more recent build of Qt) and it didn't misbehave.

                        A Offline
                        A Offline
                        Andy314
                        wrote on 12 Mar 2016, 13:08 last edited by
                        #13

                        With my new installation Creator 3.6.0 (new version) and Qt 5.5.1 (same version as before) it works now.

                        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