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. QTableView/QHeaderView behaviour with moveSection()

QTableView/QHeaderView behaviour with moveSection()

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.5k 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.
  • G Offline
    G Offline
    gsxruk
    wrote on last edited by
    #1

    Hi,

    I have an application that is using a QTableView. The view displays some information from a database table. I wanted to move the last column in the view in front of the previous column so I used the QHeaderView::moveSection() function. The function moves the last row perfectly. The table is set to single selection mode and row selection behaviour.

    However, when a row is selected, the last column header is not highlighted (all the others are highlighted as well as the selected row header). I've managed to replicate this in a simple table as well (i.e. from a static model). It is possible to make the header display correctly by hovering the mouse pointer over the header or moving the application window. This behaviour does not occur if the column is not moved.

    Is there something I may be doing wrong or is this possibly a bug?

    I'm using Linux Mint x64 and Qt 3.5.1.

    Thanks,

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

      Hi,

      Sounds a bit fishy indeed. You should take a look at the "bug report system":http://bugreports.qt-project.org to see if it's something known. If not please consider opening a new report providing a minimal compilable example that reproduce the behavior.

      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
      0
      • G Offline
        G Offline
        gsxruk
        wrote on last edited by
        #3

        Thanks. "QTBUG-40956":https://bugreports.qt-project.org/browse/QTBUG-40956 reported.

        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