Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. QTableView setSpan + moveSection causes selection mismatch
Forum Updated to NodeBB v4.3 + New Features

QTableView setSpan + moveSection causes selection mismatch

Scheduled Pinned Locked Moved Solved Qt 6
7 Posts 2 Posters 85 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.
  • J Offline
    J Offline
    JakePaulDev
    wrote last edited by
    #1

    I encountered an issue with selection positioning in QTableView after applying cell spans and column reordering. I've created a bug report: https://bugreports.qt.io/browse/QTBUG-138513
    Does anyone have an idea how to fix it?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote last edited by
      #4

      You wanted a suggestion on how to fix it. My suggestion is - don't move columns around. You can move the data underneath with a QSortFilterProxyModel.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      J 1 Reply Last reply
      0
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote last edited by
        #2

        Spanning and moving columns around normally does not work well. I would disable moving columns. Otherwise I don't see how it should work when you e.g. span column 1+2 and then move column 1 away.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        J 1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          Spanning and moving columns around normally does not work well. I would disable moving columns. Otherwise I don't see how it should work when you e.g. span column 1+2 and then move column 1 away.

          J Offline
          J Offline
          JakePaulDev
          wrote last edited by
          #3

          @Christian-Ehrlicher I indicated in the report that rows within one column are being merged, and another column is being moved. Nevertheless, merging has an effect on the cells (clicks and selections) in the columns following the moved one.

          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote last edited by
            #4

            You wanted a suggestion on how to fix it. My suggestion is - don't move columns around. You can move the data underneath with a QSortFilterProxyModel.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            J 1 Reply Last reply
            0
            • Christian EhrlicherC Christian Ehrlicher

              You wanted a suggestion on how to fix it. My suggestion is - don't move columns around. You can move the data underneath with a QSortFilterProxyModel.

              J Offline
              J Offline
              JakePaulDev
              wrote last edited by
              #5

              @Christian-Ehrlicher I think you're right. Although there were no errors in this situation in Qt version 5.11.2. Thanks!

              1 Reply Last reply
              0
              • J JakePaulDev has marked this topic as solved
              • Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote last edited by
                #6

                Please write this information into the bug report and notify me

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                J 1 Reply Last reply
                0
                • Christian EhrlicherC Christian Ehrlicher

                  Please write this information into the bug report and notify me

                  J Offline
                  J Offline
                  JakePaulDev
                  wrote last edited by
                  #7

                  @Christian-Ehrlicher Added a link and a quote in the commentary to the report

                  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