<?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[How do I make my QMainWindow&#x27;s contents dynamically resize after floating a QDockWidget?]]></title><description><![CDATA[<p dir="auto">I managed to boil the problem down to a single example:</p>
<pre><code class="language-python">from PySide6.QtCore import Qt
from PySide6.QtWidgets import QApplication, QDockWidget, QLabel, QMainWindow, QPushButton

class MainWindow (QMainWindow):
	
	def __init__ (self):
		super().__init__()
		btn = QPushButton('Create Dock')
		btn.clicked.connect(self.evt_clicked)
		self.setCentralWidget(btn)

	def evt_clicked (self) -&gt; None:
		dock = QDockWidget('Dock', self)
		dock.setWidget(QLabel('Label'))
		self.addDockWidget(Qt.BottomDockWidgetArea, dock)

if __name__ == '__main__':
	app = QApplication()
	window = MainWindow()
	window.show()
	app.exec()
</code></pre>
<p dir="auto">I clicked the button a few times to create a few docked widgets, then dragged one out of the QMainWindow area and onto my desktop to float it. After I did this, NONE of the QMainWindow's contents, the button and all remaining docks included, will resize when I resize the window itself. Taking any floating dock and re-attaching it to the window fixes this problem.</p>
<p dir="auto">I made a short video that showcases the problem: <a href="https://youtu.be/Gfpu0l4zN5M" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/Gfpu0l4zN5M</a></p>
<p dir="auto">Does anyone else know how to fix this?</p>
]]></description><link>https://forum.qt.io/topic/165048/how-do-i-make-my-qmainwindow-s-contents-dynamically-resize-after-floating-a-qdockwidget</link><generator>RSS for Node</generator><lastBuildDate>Mon, 28 Sep 2026 00:39:44 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/165048.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 Aug 2026 06:22:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do I make my QMainWindow&#x27;s contents dynamically resize after floating a QDockWidget? on Mon, 31 Aug 2026 14:01:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fatesealmagic">@<bdi>FatesealMagic</bdi></a> said in <a href="/post/839923">How do I make my QMainWindow's contents dynamically resize after floating a QDockWidget?</a>:</p>
<blockquote>
<p dir="auto">I tried this code on a different machine with Ot/PySide6 6.11.0 and it worked as expected. Thank you!</p>
<p dir="auto">EDIT: For completeness, apparently this issue only impacts very specific QT versions: <a href="https://stackoverflow.com/questions/79999518/how-do-i-make-my-qmainwindows-contents-dynamically-resize-after-floating-a-qdoc/79999535#79999535" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/79999518/how-do-i-make-my-qmainwindows-contents-dynamically-resize-after-floating-a-qdoc/79999535#79999535</a></p>
</blockquote>
<p dir="auto">Indeed: <a href="https://qt-project.atlassian.net/browse/QTBUG-147209" target="_blank" rel="noopener noreferrer nofollow ugc">https://qt-project.atlassian.net/browse/QTBUG-147209</a></p>
]]></description><link>https://forum.qt.io/post/839924</link><guid isPermaLink="true">https://forum.qt.io/post/839924</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Mon, 31 Aug 2026 14:01:03 GMT</pubDate></item><item><title><![CDATA[Reply to How do I make my QMainWindow&#x27;s contents dynamically resize after floating a QDockWidget? on Mon, 31 Aug 2026 12:38:32 GMT]]></title><description><![CDATA[<p dir="auto">I tried this code on a different machine with Ot/PySide6 6.11.0 and it worked as expected. Thank you!</p>
<p dir="auto">EDIT: For completeness, apparently this issue only impacts very specific QT versions: <a href="https://stackoverflow.com/questions/79999518/how-do-i-make-my-qmainwindows-contents-dynamically-resize-after-floating-a-qdoc/79999535#79999535" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/79999518/how-do-i-make-my-qmainwindows-contents-dynamically-resize-after-floating-a-qdoc/79999535#79999535</a></p>
]]></description><link>https://forum.qt.io/post/839923</link><guid isPermaLink="true">https://forum.qt.io/post/839923</guid><dc:creator><![CDATA[FatesealMagic]]></dc:creator><pubDate>Mon, 31 Aug 2026 12:38:32 GMT</pubDate></item><item><title><![CDATA[Reply to How do I make my QMainWindow&#x27;s contents dynamically resize after floating a QDockWidget? on Mon, 31 Aug 2026 07:09:42 GMT]]></title><description><![CDATA[<p dir="auto">This is a known bug in dock widgets which should be fixed in 6.11.2 AFAIK.</p>
]]></description><link>https://forum.qt.io/post/839921</link><guid isPermaLink="true">https://forum.qt.io/post/839921</guid><dc:creator><![CDATA[friedemannkleint]]></dc:creator><pubDate>Mon, 31 Aug 2026 07:09:42 GMT</pubDate></item></channel></rss>