Version: git-latest (using Devel) OS: Linux PersonSetModel::rowCount is continuously called and continues to load all contacts Reproducible: Always Steps to Reproduce: add debug line in the function and use the test tool grundelborg made here : kde:scratch/gberg/telepathy-kde-models-test-ui Expected Results: The method should not be called once finished loading all contacts
Why do you think that? rowcount gets called all the time by the ListView every time you resize and such so it knows how big to draw scollbars and such.
As David Said. the view can call rowCount() whenever it wants. It does this regularly when redrawing (ie. the contents of the view change, you mouseover the view, you scroll the view etc). It's out of the model's control anyway - just a fact of how Qt itemviews work.