title: Subclassing QAbstractTableModel for a large dataset via HTML/Ajax?
body: <p>I'm trying to display a large table (a playlist with title, composer, etc... so I can't use a QListWidget) via QTableView with a sub-class of QAbstractTableModel. The call you have to override retrieving the data looks like this:</p>
  
  <pre><code>QVariant data(const QModelIndex &amp;index, int role = Qt::DisplayRole) const;
  </code></pre>
  
  <p>This functions is called everytime for every cell (specified by index.row() &amp; index.colum()). Translating that 1:1 to a HTML/Ajax would even kill performance with a local network.</p>
  
  <p>So what are my options here? This must be possible because QSqlQueryModel exists and they must have the same problem. Googling for a combination of Ajax/QAbstractTableModel returned nothing at all.</p>
  
  <p>Any ideas?</p>
  
  <p>PS: To semi-answer myself, looking at the QT-Sources <code>src/sql/models/qsqlquerymodel.cpp</code> reveals the answer. It's possible but I'm wondering if someone knows a of-out-the-box solution.</p>