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. Synchronizing 2 tableviews when Moving Column.
QtWS25 Last Chance

Synchronizing 2 tableviews when Moving Column.

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

    I have an App with 2 tableviews and 1 custum view on the same datamodel. On both tableviews I have allowed moving columns by horizHeader->setSectionsMovable(true);
    In the View it's working OK, but I want to synchronize all my Views after moving a column. So I overwrite the Slot ColumnMoved in MyTableView class, but the debugger never goes into this Slot.

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

      Hi and welcome to devnet,

      columnMoved is not virtual so you can't re-implement it.

      You should add a slot that will call moveSection on the QHeaderView of your other QTableViews

      Hope it helps

      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
      • A Offline
        A Offline
        AnnNie
        wrote on last edited by
        #3

        Much thanks. That works.

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

          You're welcome !

          Since it's working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

          Also, consider up-voting answer(s) that you found useful, so others may find them more easily.

          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

          • Login

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