Finally I think I find out the origin of this icon problem !
I was trying to play with evens of qFileDialog... and that was not working
too.
I found this thread
<http://stackoverflow.com/questions/23182678/qfiledialog-no-signals-emitted-wrong-starting-directory>
where it is advised not using native dialogs in order to avoid some bugs
and be faster.
That was the problem so I directly try to add an icon to this damned dialog
(I know I a bit obsessed :p)
And that worked, the dialog look a bit different but personally I'm fine
with that. You can have a shot with this code :
from leo.core.leoQt import QtWidgets
def onDirEntered():
g.es("Entered in a new directory")
dialog = QtWidgets.QFileDialog(None, 'Select directory')
dialog.setDirectory(os.getenv('HOME'))
dialog.setFileMode(QtWidgets.QFileDialog.Directory)
dialog.directoryEntered.connect(onDirEntered)
# Try with and without this option :
dialog.setOption(QtWidgets.QFileDialog.DontUseNativeDialog)
dialog.setWindowIcon(g.app.gui.appIcon)
dialog.exec_()
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.