title: QAbstractItemModel Lazy Loading locks application
body: <p>I have implemented canFetchMore, hasChildren and fetchMore in order to allow my model to be lazy loaded. It's very simple and based on QT's: <a href="http://doc.qt.io/archives/qt-4.7/itemviews-simpletreemodel.html" rel="nofollow">http://doc.qt.io/archives/qt-4.7/itemviews-simpletreemodel.html</a></p>
  
  <p>My problem is that in my application fetching children is not a very quick operation, it involves a few seconds of delay on the server side while it figures out who the children actually are.</p>
  
  <p>I'm unsure how to deal with that. I can't have my application locking up for several seconds every time someone expands a node. I don't know how to go about making this happen in the background. If I was to create a sub-process or thread to actually do the work of retrieving the children and updating the client side data structure, how would I go about telling the model that this had successfully completed (and for the node to finally expand).</p>
  
  <p>Also, is there a way to show that the node is currently in the process of loading the data in the background?</p>
  
  <p>Apologies if these are stupid questions, GUI programming is still a bit of a mystery to me and I've never used QT before.</p>
  
  <p>For the record, I'm using Python, but if answers are given in C++ I can understand them.</p>
  
  <p>Thanks</p>