[quote author="zither" date="1310915639"]You means that, cause of slow performance is
QListView.setModel(myModel)?[/quote]
This is the cause of your problem.
@
while(sql.next()){
item = new QStandardItem(sql.value(0).toString());
QStandardItemModel->appendRow(item);
}
@
Traversing the whole result set is an expensive operation. Allocating, constructing and copying elements are expensive operations. You do all of them.
I don't think that displaying the data is your problem. I did a quick performance test and I see no difference in displaying hundreds, thousands or hundreds of thousands of items.
You cannot create a class which is a QAbstractItemModel, QSqlQueryModel and QStandardItemModel. QAbstractItemModel is the base class for all models. It defindes a basic set of operations a class has to provide so it can be used by any of the views.
You should start be reading on how models work in Qt (there is plenty of documentation) and then create your own subclass of QAbstractItemModel which then can be used by the view. You will probably end up in a model or proxy model which has a QSqlQueryModel and a QStandardItemModel and does some index mapping from the "outer" indices to the "inner" indices of QSqlQueryModel and QStandardItemModel.