<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QFileDialog getOpenFileName DontUseNativeDialog strange effect when dragging window]]></title><description><![CDATA[<p dir="auto">I use QFileDialog.getOpenFileName with option DontUseNativeDialog and not null parent. When I try to drag dialog window it is dragged together with parent widget window underneath (in my case qapp window). If parent window was maximized it is restored to previous size first. Is it planned behavior or a bug?</p>
<p dir="auto">My environment: Qt 5.15.0, Ubuntu 20, Python 3.8.0, PyCharm. The same effect using PyQt5 and PySide2.</p>
]]></description><link>https://forum.qt.io/topic/116821/qfiledialog-getopenfilename-dontusenativedialog-strange-effect-when-dragging-window</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 00:02:12 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/116821.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Jul 2020 23:29:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QFileDialog getOpenFileName DontUseNativeDialog strange effect when dragging window on Fri, 10 Jul 2020 05:08:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a></p>
<p dir="auto">After upgrading PyQt5 to latest, PyQt version works as expected. In PySide2 windows are still pinned together.</p>
<pre><code>from PySide2.QtWidgets import (QMainWindow, QAction, QFileDialog, QApplication)
import sys

class Example(QMainWindow):

    def __init__(self):
        super().__init__()
        self.initUI()

    def initUI(self):
        openFile = QAction('Open', self)
        openFile.triggered.connect(self.showDialog)
        menubar = self.menuBar()
        fileMenu = menubar.addMenu('&amp;File')
        fileMenu.addAction(openFile)
        self.show()

    def showDialog(self):
        fname = QFileDialog.getOpenFileName(self, 'Open file', '/', options=QFileDialog.DontUseNativeDialog)

app = QApplication()
ex = Example()
sys.exit(app.exec_())
</code></pre>
]]></description><link>https://forum.qt.io/post/605960</link><guid isPermaLink="true">https://forum.qt.io/post/605960</guid><dc:creator><![CDATA[Jureq]]></dc:creator><pubDate>Fri, 10 Jul 2020 05:08:24 GMT</pubDate></item><item><title><![CDATA[Reply to QFileDialog getOpenFileName DontUseNativeDialog strange effect when dragging window on Thu, 09 Jul 2020 20:09:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Since you gave it a parent, I am not surprised to see both move together as the dialog is modal to the parent widget.. Can you provide a minimal example script that shows this ?</p>
]]></description><link>https://forum.qt.io/post/605926</link><guid isPermaLink="true">https://forum.qt.io/post/605926</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 09 Jul 2020 20:09:13 GMT</pubDate></item></channel></rss>