how do I merge QFileSystemModel with the python List

Post here if you need help with creating a Graphical User Interface in Python.

how do I merge QFileSystemModel with the python List

Postby sanfx » Thu Oct 31, 2013 4:49 pm

I have a list that contains some paths ['/users/sanfx/test1', '/users/sanfx/test2/', '/App/project/modules']

Code: Select all
      dirModel = QtGui.QFileSystemModel()
      dirModel.setRootPath(QtCore.QDir.currentPath())
      dirModel.setFilter(QtCore.QDir.AllDirs | QtCore.QDir.NoDotAndDotDot | QtCore.QDir.Files)
      # dirModel.setNameFilters(self.filter)
      dirModel.setNameFilterDisables(0)
      completer = QtGui.QCompleter(dirModel,self)      
      completer.setModel(dirModel)
      completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
      self.addPathEdit.setCompleter(completer)


i want to add both these list and completer to be set to completer for self.addPathEdit
sanfx
 
Posts: 3
Joined: Thu Oct 31, 2013 4:22 pm

Return to GUI

Who is online

Users browsing this forum: No registered users and 3 guests

cron