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
QtWS25 Last Chance

QTableWidget with 2 headers

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 2.1k 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.
  • M Offline
    M Offline
    Mikeeeeee
    wrote on 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

    JonBJ 1 Reply Last reply
    0
    • M Mikeeeeee

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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

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

      1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on 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 last edited by
          #4

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

          jsulmJ 1 Reply Last reply
          0
          • M Mikeeeeee

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

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on 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
            2
            • jsulmJ jsulm

              @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 last edited by
              #6

              @jsulm said in QTableWidget with 2 headers:

              It does not compile

              It does not compile

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on 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

                JonBJ 1 Reply Last reply
                0
                • SGaistS SGaist

                  Maybe share the error you are getting ?

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on 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

                  • Login

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