<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hi all.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>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.</div>
<div>&nbsp;</div>
<div>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 &lt;Ctrl&gt;&#43;LeftMouseClick. However clicking in an area without files and selecting all using the accelerator &lt;Ctrl&gt;&#43;&lt;A&gt;
shows the expected behavior. All files get selected and I am able to commit using the OK-Button.</div>
<div>&nbsp;</div>
<div>The helper on windows shows the expected behavior in all scenarios.</div>
<div>&nbsp;</div>
<div>The behavior is the same for the getOpenFileName variant of the method.</div>
<div>&nbsp;</div>
<div>Here is the code snippet I am using:</div>
<div>&nbsp;</div>
<div>jobfilenames=QFileDialog.getOpenFileNames(self,</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Choose File(s)&quot;,</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QDir.currentPath(),</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;Python files (*.py)&#8221;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for jobfilename in jobfilenames:</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print jobfilename</div>
<div>&nbsp;</div>
<div>What am I doing wrong here?</div>
<div>&nbsp;</div>
<div>Best regards</div>
<div>&nbsp;</div>
<div>Jens</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</font>
</body>
</html>