44 self.selectedFilesFolders = [] |
44 self.selectedFilesFolders = [] |
45 |
45 |
46 QFileDialog.__init__(self, parent, caption, directory, fileFilter) |
46 QFileDialog.__init__(self, parent, caption, directory, fileFilter) |
47 self.setFileMode(QFileDialog.ExistingFiles) |
47 self.setFileMode(QFileDialog.ExistingFiles) |
48 |
48 |
49 def exec_(self): |
49 def exec(self): |
50 """ |
50 """ |
51 Public slot to finalize initialisation and start the event loop. |
51 Public slot to finalize initialization and start the event loop. |
52 |
52 |
53 @return accepted or rejected (QDialog.DialogCode) |
53 @return accepted or rejected (QDialog.DialogCode) |
54 """ |
54 """ |
55 self.openBtn = self.findChildren(QPushButton)[0] |
55 self.openBtn = self.findChildren(QPushButton)[0] |
56 self.fileNameEdit = self.findChild(QLineEdit) |
56 self.fileNameEdit = self.findChild(QLineEdit) |
57 self.directoryEntered.connect(self.on_directoryEntered) |
57 self.directoryEntered.connect(self.on_directoryEntered) |
58 self.tree = self.findChild(QTreeView) |
58 self.tree = self.findChild(QTreeView) |
59 self.tree.selectionModel().selectionChanged.connect( |
59 self.tree.selectionModel().selectionChanged.connect( |
60 self.on_selectionChanged) |
60 self.on_selectionChanged) |
61 return QFileDialog.exec_(self) |
61 return QFileDialog.exec(self) |
62 |
62 |
63 def accept(self): |
63 def accept(self): |
64 """ |
64 """ |
65 Public method to update the list with the selected files and folders. |
65 Public method to update the list with the selected files and folders. |
66 """ |
66 """ |
127 if options is None: |
127 if options is None: |
128 options = QFileDialog.Options() |
128 options = QFileDialog.Options() |
129 options |= QFileDialog.DontUseNativeDialog |
129 options |= QFileDialog.DontUseNativeDialog |
130 dlg = DirFileDialog(parent, caption, directory, fileFilter) |
130 dlg = DirFileDialog(parent, caption, directory, fileFilter) |
131 dlg.setOptions(options) |
131 dlg.setOptions(options) |
132 dlg.exec_() |
132 dlg.exec() |
133 return dlg.selectedFilesFolders |
133 return dlg.selectedFilesFolders |
134 |
134 |
135 |
135 |
136 class CxfreezeConfigDialog(QDialog, Ui_CxfreezeConfigDialog): |
136 class CxfreezeConfigDialog(QDialog, Ui_CxfreezeConfigDialog): |
137 """ |
137 """ |