title: PyQt4 force view to fetchMore from QAbstractItemModel
body: <p>I have a QTableView that dynamically loads data from a custom model that inherits QAbstractItemModel. The model implements both fetchMore and canFetchMore. </p>
  
  <p>The problem is that I would like to be able to select all rows for small datasets, but if I hit ctrl-a in the view it only will select the rows that are currently loaded. </p>
  
  <p>Is there some mechanism to force the QTableView to fetch more rows? Ideally I would like to show a progress bar indicating the fraction of data that has been loaded from the model. Every few seconds I would like to force the model to load a bit more of the data, but I still want to let the user interact with the data that has been loaded so far. This way when the progress bar is complete the user can press ctrl-a and be confident that  all data is selected. </p>
  
  <hr>
  
  <p>Edit: I have another motivating use case. I want to jump to a specific row, but if that row is not loaded my interface does nothing. </p>
  
  <p>How can I force a QAbstractItemModel to fetch more (or up to a specific row) and then force the QTableView to show it? </p>
  
  <p>If I don't implement fetchMore and canFetchMore, the previous functionality works, but loading the tables is very slow. When I implement those methods the opposite happens. Not having an answer to this problem is causing issues with the usability of my qt interface, so I'm opening a bounty for this question. </p>
  
  <p>Here is a method I'm using to select a specific row. </p>
  
  <pre><code>def select_row_from_id(view, _id, scroll=False, collapse=True):
      """
          _id is from the iders function (i.e. an ibeis rowid)
          selects the row in that view if it exists
      """
      with ut.Timer('[api_item_view] select_row_from_id(id=%r, scroll=%r, collapse=%r)' %
                    (_id, scroll, collapse)):
          qtindex, row = view.get_row_and_qtindex_from_id(_id)
          if row is not None:
              if isinstance(view, QtWidgets.QTreeView):
                  if collapse:
                      view.collapseAll()
                  select_model = view.selectionModel()
                  select_flag = QtCore.QItemSelectionModel.ClearAndSelect
                  #select_flag = QtCore.QItemSelectionModel.Select
                  #select_flag = QtCore.QItemSelectionModel.NoUpdate
                  with ut.Timer('[api_item_view] selecting name. qtindex=%r' % (qtindex,)):
                      select_model.select(qtindex, select_flag)
                  with ut.Timer('[api_item_view] expanding'):
                      view.setExpanded(qtindex, True)
              else:
                  # For Table Views
                  view.selectRow(row)
              # Scroll to selection
              if scroll:
                  with ut.Timer('scrolling'):
                      view.scrollTo(qtindex)
              return row
      return None
  </code></pre>
  
  <p>If the user has manually scrolled past the row in question then this function works. However, if the user has not seen the specific row this function just scrolls back to the top of the view. </p>