Hi all.
I am working on a little helper for my job management system to insert jobs
into it using a PyQt GUI that should be usable on both windows and linux.
I came over a rather odd behavior for the QFileDialog.getOpenFileNames method
when running that helper under linux. Selecting a file within the dialog
immediately closes the dialog returning a list containing exactly that one and
only selected file. It feels like selecting one file and immediately clicking
the OK Button afterwards. There seems to be no way to select more than one file
using <Ctrl>+LeftMouseClick. However clicking in an area without files and
selecting all using the accelerator <Ctrl>+<A> shows the expected behavior. All
files get selected and I am able to commit using the OK-Button.
The helper on windows shows the expected behavior in all scenarios.
The behavior is the same for the getOpenFileName variant of the method.
Here is the code snippet I am using:
jobfilenames=QFileDialog.getOpenFileNames(self,
"Choose File(s)",
QDir.currentPath(),
"Python files (*.py)"
)
for jobfilename in jobfilenames:
print jobfilename
What am I doing wrong here?
Best regards
Jens
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt