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. QTDataVisualization only draw certain rows/cols of the QAbstractTableModel
Forum Updated to NodeBB v4.3 + New Features

QTDataVisualization only draw certain rows/cols of the QAbstractTableModel

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 165 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.
  • mhsgoudM Offline
    mhsgoudM Offline
    mhsgoud
    wrote on last edited by
    #1

    Hello, I am trying to visualize a table model using QTDatavisualization. I used existing example files and here is the code:

    m_Proxy = new QSurfaceDataProxy(); 
    m_Series = new QSurface3DSeries(m_Proxy); 
    
    QItemModelSurfaceDataProxy *proxy = new QItemModelSurfaceDataProxy(model); 
    
    proxy->setUseModelCategories(true); 
    m_Series = new QSurface3DSeries(proxy); 
     
    m_Series->setDrawMode(QSurface3DSeries::DrawSurfaceAndWireframe); 
    m_graph->addSeries(m_sqrtSinSeries);
    
    

    where model is QAbstractTableModel

    This plots all the rows/cols interactively.

    Question is: how can I make it only plot certain range of rows/cols from model? I know that I can set range for max/min in axis but that's not what I am looking for, I want to for instance remove first row and column data when plotting the graph, while the table should show those.

    Thank you for your help.

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

      Hi,

      What comes to mind is to put a proxy model between your original model and the QItemModelSurfaceDataProxy. That proxy would only return the data that you want to be shown.

      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