Use a QFileDialog as Widget
-
Hi,
I would like use a QFileDialog as Widget in my software.
So I do :
@SelectFile = QFileDialog(self, Qt.Widget)
self.ui.output_widget.addWidget(SelectFile)@That work but that create a widow too :
!http://hizo.fr/img/qt/QFileDialog.png!How to hide the other window ?
Thank you and sorry for my english.
Kubuntu 14.10 64bits – Python 3.4.2 – Qt 4.8.6
-
I find with help :
@ self.SelectFile = QFileDialog(self.ui.widget, Qt.Widget)
self.SelectFile.setObjectName("SelectFile")
self.SelectFile.setOption(QFileDialog.DontUseNativeDialog)
self.SelectFile.installEventFilter(self)
self.SelectFile.done = self.doneNo
self.SelectFile.currentChanged.connect(self.doneNo)
self.ui.output_widget.addWidget(self.SelectFile)def doneNo(self, Value): if isinstance(Value, str): print(Value)@
So, I understand, it's not the normal use but how to do like QFileDialog ?
I want files list and folder system move.it would lack in Qt?
-
No it doesn't lack, you have all the building blocks to do it yourself. Have a look at QTreeView, QFileSystemModel etc.