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. Subclassing QTableView to dynamically hide columns
QtWS25 Last Chance

Subclassing QTableView to dynamically hide columns

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 409 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.
  • starryeyedS Offline
    starryeyedS Offline
    starryeyed
    wrote on last edited by
    #1

    Hello, I would like QTableView to react to query being reset in particular model (I would say QAbstractItemView::model().dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight), but it's not that, the model I'm interested in isn't set to view, it's behind a proxy so I would rather add a QTableView* pointer field to subclassed child of QTableView I'd be making; and also define setter such as setModel(QSqLQueryModel* qm) {m=qm;}. Question is - how do you see efficient check for whole column, can you give any sample pseudocode? Or links to doc.qt?

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

      Hi,

      Why not just connect that specific model modelReset signal to whatever slot does what you want ?

      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

      • Login

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