I know how to make a simple QTreeView() with a QDirModel (or QFileSystemModel) to show the files/folders in the system but I want to add a checkbox next to each of them so the user can select some of the folders/files on his system. Obviously, I also need to know which ones he has chosen. Any hints?
basically something like this...
Below is a sample code that makes a directory view but without the checkboxes.
from PyQt4 import QtGui
if __name__ == '__main__':
import sys
app = QtGui.QApplication(sys.argv)
model = QtGui.QDirModel()
tree = QtGui.QTreeView()
tree.setModel(model)
tree.setAnimated(False)
tree.setIndentation(20)
tree.setSortingEnabled(True)
tree.setWindowTitle("Dir View")
tree.resize(640, 480)
tree.show()
sys.exit(app.exec_())