<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 28/12/16 à 11:36, Michael Davies a
écrit :<br>
</div>
<blockquote
cite="mid:CA+o=KQWP-ucg97qV0f=HTb5Zgp-FqUG=iDn+D+rS-O8NqqLR8Q@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>This is my first post on a mailing list - so please bear
with me.</div>
<div><br>
</div>
<div>I have noticed an issue with running a modal QDialog on the
KDE5 desktop. When I run the following code:</div>
<div><br>
</div>
<div>
<div>import sys</div>
<div>from PyQt5 import QtCore</div>
<div>from PyQt5 import QtWidgets</div>
<div><br>
</div>
<div>class MainWindow(QtWidgets.<wbr>QMainWindow):</div>
<div><br>
</div>
<div> def __init__(self, parent=None):</div>
<div> super(MainWindow, self).__init__(parent)</div>
<div><br>
</div>
<div> self.openAction = QtWidgets.QAction('About',
self)</div>
<div> self.openAction.triggered.<wbr>connect(self.aboutDialog)</div>
<div> menuBar = self.menuBar()</div>
<div> fileMenu = menuBar.addMenu('&File')</div>
<div> fileMenu.addAction(self.<wbr>openAction)</div>
<div> self.calendar = QtWidgets.QCalendarWidget(<wbr>self)</div>
<div> self.setCentralWidget(self.<wbr>calendar)</div>
<div><br>
</div>
<div> def aboutDialog(self):</div>
<div> self._about = AboutDialog(self)</div>
<div> self._about.exec_()</div>
<div><br>
</div>
<div>class AboutDialog(QtWidgets.QDialog)<wbr>:</div>
<div><br>
</div>
<div> def __init__(self, parent):</div>
<div> super(AboutDialog, self).__init__(parent)</div>
<div><br>
</div>
<div> self.setMinimumSize(400, 350)</div>
<div><br>
</div>
<div>if __name__ == '__main__':</div>
<div> app = QtWidgets.QApplication(sys.<wbr>argv)</div>
<div> app_window = MainWindow()</div>
<div> app_window.showMaximized()</div>
<div> sys.exit(app.exec_())</div>
</div>
<div><br>
</div>
<div>The issue is this - when I open the QDialog and then
minimize the main window, the QDialog doesn't get minimized -
so it is still working independently. What happens exactly is
that QMainWindow minimizes and QDialog is just left on screen.
<br>
<br>
This only happens on KDE as far as I can tell. On openbox /
xfce both windows are minimized. In Windows, the QMainWindow
minimize button is disabled when the QDialog is open. I have
ran the code on various KDE distros: KDE Neon Stable, Arch
Linux with KDE5 and Kubuntu 16.04 - all have same problem.</div>
<div><br>
</div>
<div>Any help with this issue would be much appreciated!<br>
<br>
Michael</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
<p>Works as expected on Mate (ex gnome2), both windows are
minimized.</p>
<p>Seems a behavior of KDE.</p>
<p><br>
</p>
<p>Vincent<br>
</p>
</body>
</html>