title: filtering in qtreeview in pyqt and to display only folders
body: <p>I'm working on a GUI which needs qtreeview in the layout. now I've written a sample code to get know with the working of qtreeview and I got stuck with a problem.</p>
  
  <p>My problems are:
  1. it should display only folders present in the given path.</p>
  
  <p>2.doubleclicking the folder in the qtreeview should give contents of the folder in the column view with owner also as one of the column(here I mean to say if I do a "ll" in terminal I get a list with owners of the folder) I want that information as well.</p>
  
  <p>this is my code:</p>
  
  <pre><code>from PyQt4 import QtCore, QtGui
  
  try:
      _fromUtf8 = QtCore.QString.fromUtf8
  except AttributeError:
      def _fromUtf8(s):
          return s
  
  try:
      _encoding = QtGui.QApplication.UnicodeUTF8
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig, _encoding)
  except AttributeError:
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig)
  
  class Ui_Dialog(object):
      def setupUi(self, Dialog):
          Dialog.setObjectName(_fromUtf8("Dialog"))
          Dialog.resize(1150, 905)
          self.gridLayout_2 = QtGui.QGridLayout(Dialog)
          self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
          self.groupBox = QtGui.QGroupBox(Dialog)
          self.groupBox.setObjectName(_fromUtf8("groupBox"))
          self.gridLayout = QtGui.QGridLayout(self.groupBox)
          self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
          self.treeView = QtGui.QTreeView(self.groupBox)
          self.treeView.setObjectName(_fromUtf8("treeView"))
          self.gridLayout.addWidget(self.treeView, 0, 0, 1, 1)
          self.columnView = QtGui.QColumnView(self.groupBox)
          self.columnView.setObjectName(_fromUtf8("columnView"))
          self.gridLayout.addWidget(self.columnView, 0, 1, 1, 1)
          self.gridLayout_2.addWidget(self.groupBox, 0, 0, 1, 2)
          spacerItem = QtGui.QSpacerItem(1073, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
          self.gridLayout_2.addItem(spacerItem, 1, 0, 1, 1)
          self.pushButton = QtGui.QPushButton(Dialog)
          self.pushButton.setObjectName(_fromUtf8("pushButton"))
          self.gridLayout_2.addWidget(self.pushButton, 1, 1, 1, 1)
          self.fileSystemModel = QtGui.QFileSystemModel(self.treeView)
          self.fileSystemModel.setFilter(QtCore.QDir.AllDirs | QtCore.QDir.NoDotAndDotDot | QtCore.QDir.AllEntries)
          self.fileSystemModel.setReadOnly(False)
          self.root = self.fileSystemModel.setRootPath('/home/hamanda/present_wrkng_python')
          self.treeView.setModel(self.fileSystemModel)
          self.treeView.setRootIndex(self.root)
  
          self.retranslateUi(Dialog)
          QtCore.QMetaObject.connectSlotsByName(Dialog)
  
      def retranslateUi(self, Dialog):
          Dialog.setWindowTitle(_translate("Dialog", "Dialog", None))
          self.groupBox.setTitle(_translate("Dialog", "List of folders", None))
          self.pushButton.setText(_translate("Dialog", "Quit", None))
  
  
  if __name__ == "__main__":
      import sys
      app = QtGui.QApplication(sys.argv)
      Dialog = QtGui.QDialog()
      ui = Ui_Dialog()
      ui.setupUi(Dialog)
      Dialog.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>Please help me with this I'm new to pyqt programming</p>