Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ul> <li>You'll need to determine which rows to select. To do so, loop through the entire model and determine which rows have NULL as the timestamp. To access the model's data, you can use <a href="http://doc.trolltech.com/4.5/qsqlquerymodel.html#record" rel="nofollow noreferrer"><code>QSqlQueryModel::record()</code></a>.</li> <li>You'll need to create a custom selection. The current selection is represented by the <a href="http://doc.trolltech.com/4.5/qitemselectionmodel.html" rel="nofollow noreferrer"><code>QItemSelectionModel</code></a> class. You can access the table view's slection via <a href="http://doc.trolltech.com/4.5/qabstractitemview.html#selectionModel" rel="nofollow noreferrer"><code>QAbstractItemView::selectionModel()</code></a> and <a href="http://doc.trolltech.com/4.5/qabstractitemview.html#setSelectionModel" rel="nofollow noreferrer"><code>QAbstractItemView::setSelection()</code></a>.</li> </ul> <p>In response to your code update, you could do without the loop if you use <a href="http://doc.trolltech.com/4.5/qabstractitemview.html#SelectionBehavior-enum" rel="nofollow noreferrer"><code>QAbstractItemView::SelectRows</code></a>. Just use the selection you received from <a href="http://doc.trolltech.com/4.5/qabstractitemmodel.html#match" rel="nofollow noreferrer"><code>QAbstractItemModel::match()</code></a>.</p> <p>As for speed, do check the efficiency of the table on a release build -- I know that debug/release build differences are big for cases like yours. If you're using Qt 4.5 you'll notice a speed-up too, as they did work to improve elements like tables in that release.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload