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 with 2 headers
Forum Updated to NodeBB v4.3 + New Features

QTableWidget with 2 headers

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 2.1k 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
    Mikeeeeee
    wrote on 7 Apr 2021, 17:37 last edited by
    #1

    Good afternoon.
    Is it possible to make superheadings over some QTableWidget headers so that the superheadings include one or more headers?
    1.jpg

    J 1 Reply Last reply 7 Apr 2021, 18:11
    0
    • M Mikeeeeee
      7 Apr 2021, 17:37

      Good afternoon.
      Is it possible to make superheadings over some QTableWidget headers so that the superheadings include one or more headers?
      1.jpg

      J Offline
      J Offline
      JonB
      wrote on 7 Apr 2021, 18:11 last edited by JonB 4 Jul 2021, 18:11
      #2

      @Mikeeeeee
      No, QTableWidget/QTableView does not offer that.

      1 Reply Last reply
      2
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 7 Apr 2021, 18:24 last edited by
        #3

        Hi,

        You will have to implement your own QHeaderView for that kind of stuff.

        You have here an example that shows how to implement the span of a header over multiple columns. It could be a base for your custom header.

        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
        2
        • M Offline
          M Offline
          Mikeeeeee
          wrote on 8 Apr 2021, 07:25 last edited by
          #4

          This example does not run. Are there any other examples?

          J 1 Reply Last reply 8 Apr 2021, 07:26
          0
          • M Mikeeeeee
            8 Apr 2021, 07:25

            This example does not run. Are there any other examples?

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 8 Apr 2021, 07:26 last edited by
            #5

            @Mikeeeeee said in QTableWidget with 2 headers:

            This example does not run

            What do you mean? It does not compile? It does not start? Any error messages?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            M 1 Reply Last reply 8 Apr 2021, 15:13
            2
            • J jsulm
              8 Apr 2021, 07:26

              @Mikeeeeee said in QTableWidget with 2 headers:

              This example does not run

              What do you mean? It does not compile? It does not start? Any error messages?

              M Offline
              M Offline
              Mikeeeeee
              wrote on 8 Apr 2021, 15:13 last edited by
              #6

              @jsulm said in QTableWidget with 2 headers:

              It does not compile

              It does not compile

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 8 Apr 2021, 18:07 last edited by
                #7

                Maybe share the error you are getting ?

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

                J 1 Reply Last reply 8 Apr 2021, 18:47
                0
                • S SGaist
                  8 Apr 2021, 18:07

                  Maybe share the error you are getting ?

                  J Offline
                  J Offline
                  JonB
                  wrote on 8 Apr 2021, 18:47 last edited by
                  #8

                  @SGaist
                  That would be a lot to ask.

                  The example is from 2014. Even then there are two comments from people about compiling it. I don't know whether @Mikeeeeee heeded those.

                  1 Reply Last reply
                  0

                  5/8

                  8 Apr 2021, 07:26

                  • Login

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