I have customized QAbstractItemModel & QTreeView.

rowCount() is calling for all the top level items in a view, is it a default behavior of model ? //I set setAllColumnsShowFocus( true ); setUniformRowHeights( true );
If so, can we change this so that it will get called only for currently viewing items in view.

I am dealing with huge data (millions of rows) because of this behavior there is some delay in viewing items.

Any suggestions ?