title: How to correct the "expand/collapse" icon on the QTreeView?
body: <p><a href="https://i.stack.imgur.com/RfNE1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RfNE1.png" alt="enter image description here"></a></p>
  
  <p>when you see this expand icon, you will think that there are something under the folder. but there is nothing. this issue causes a poor user experience. how to fix it? (** if the folder is empty, the expand icon is not displayed.)</p>
  
  <p>my code basically looks like this:</p>
  
  <p>QFileSystemModel ---> QTreeView</p>
  
  <p>edit3:</p>
  
  <pre class="lang-py prettyprint-override"><code>import sys
  from PySide2.QtCore import *
  from PySide2.QtWidgets import *
  
  libPath = 'f:/tmp22'
  
  # RUN ------------------------------------------------------------------
  if __name__ == '__main__':
      app = QApplication(sys.argv)
  
      # data model ----------------------------------------------------------
      treeModel = QFileSystemModel()
      treeModel.setFilter(QDir.NoDotAndDotDot | QDir.Dirs)
      treeModel.setRootPath(libPath)
  
      # setup ui -------------------------------------------------------------
      treeView = QTreeView()
      treeView.setModel(treeModel)
      treeView.setRootIndex(treeModel.index(libPath))
  
      # show ui -------------------------------------------------------------
      treeView.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>the structure of the folders:</p>
  
  <pre><code>F:/tmp22
  F:/tmp22/folder1    &lt;-------- empty!
  F:/tmp22/_folder2   &lt;-------- empty!
  </code></pre>