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. How could I rewrite my TableView`s header??

How could I rewrite my TableView`s header??

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 2.9k 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.
  • C Offline
    C Offline
    clan131
    wrote on last edited by
    #1

    I need no Separation line between my QTableViews headers section4 to section5,How should I do ?
    Thanks answering...

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Screenshot please?

      1 Reply Last reply
      0
      • C Offline
        C Offline
        clan131
        wrote on last edited by
        #3

        !http://diy-ucenter.diypda.com/data/avatar/000/23/57/78_avatar_big.jpg(thanks)!

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sam
          wrote on last edited by
          #4

          Explanation for the above screenshot ?? what is section 4 to section 5 ?

          Edit : ScreenShot is updated, previously it was showing an image of a girl.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            clan131
            wrote on last edited by
            #5

            header`s column4 to column5, my fault ,bad English

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Well, I don't see 5 columns in that screenshot.
              Oh... wait, I think I know what you mean. At first, I thought you meant that you did not get a separator (and rightly considdered this a bug). Now, I understand that you want to remove the separator, and are asking how to do that.

              There is no simple way for that. I'd personally try to subclass QHeaderView and reimplement the paintevent to render another section (via the style) over the two sections. No idea if that would be hard to pull off though.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                clan131
                wrote on last edited by
                #7

                I used a QProxyStyle to draw a widly rect on column4 , wide enough to cover the column5s separator ....My original intention is when I trying to create a two-checkrole on one cell in QTableView,but I found it is hard to implement and manipulate its check state...So I m trying to figure it another way ...
                but another question came out...
                How can I prevent a mouse-change when i mouse hover on a separator?

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  broadpeak
                  wrote on last edited by
                  #8

                  You have to search some solution from here:
                  http://doc.qt.digia.com/4.7-snapshot/qheaderview.html

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andre
                    wrote on last edited by
                    #9

                    I think it would involve filtering the mouse events that happen when moving the mouse over the separator. If you're at the separator (or very close to it), just filter out the events.

                    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