<?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[PyQt QDockWidget in a Layout is no more movable ...]]></title><description><![CDATA[<p dir="auto">Hi guys !</p>
<p dir="auto">I m new to Qt and I am dealing with my first UI.<br />
What I want to do is to have QDockWidgets into a ScrollArea and this scroll area is part of a QtabWidget so when I switch to tab2 I don't see my QDocksWidgets anymore ...</p>
<p dir="auto">After typing few lines of code :<br />
my QDockWidgets are going inside my QScrollArea I can dock them out and dock them back in but I <strong>can't move them</strong>  when they are docked out...<br />
I have had a look at some "<em>dockWidgetFeatures</em>" tried the "<em>isFloating</em>" but nothing seems to work ...</p>
<p dir="auto">That's why I am writing this post, hopefully someone already dealt with that and can help me or just tell me that I am doing it the wrong way ...</p>
<p dir="auto">here is a part of my code:</p>
<pre><code># create dock 
self.dock = QtGui.QDockWidget(self.selectedFunction, parent=self)

# edit features
self.dock.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)
self.setDockOptions(QtGui.QMainWindow.AllowNestedDocks)

# populate dock
self.dockWidgetContent = QtGui.QWidget()
self.dockLayout = QtGui.QVBoxLayout(self.dockWidgetContent)

# add dock into a layout
hbox = QtGui.QHBoxLayout()
hbox.addWidget(self.dock)

# add the layout into my scroll area  (ultraLayout is the general Layout inside my scroll)
self.ultraLayout.insertLayout(-1, hbox)

# set dock content 
self.dock.setWidget(self.dockWidgetContent)
</code></pre>
<p dir="auto">Thank you !<br />
Goffer</p>
]]></description><link>https://forum.qt.io/topic/58133/pyqt-qdockwidget-in-a-layout-is-no-more-movable</link><generator>RSS for Node</generator><lastBuildDate>Thu, 15 Oct 2026 01:08:52 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/58133.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Aug 2015 00:01:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PyQt QDockWidget in a Layout is no more movable ... on Thu, 27 Aug 2015 19:09:41 GMT]]></title><description><![CDATA[<p dir="auto">Then you can use a QMainWindow as widget in the first tab so you have everything you need in it and don't need to fiddle around to replicate the functionality</p>
]]></description><link>https://forum.qt.io/post/288050</link><guid isPermaLink="true">https://forum.qt.io/post/288050</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 27 Aug 2015 19:09:41 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt QDockWidget in a Layout is no more movable ... on Thu, 27 Aug 2015 00:54:58 GMT]]></title><description><![CDATA[<p dir="auto">I only want my dock area to be in the first tab. That's all.</p>
]]></description><link>https://forum.qt.io/post/287958</link><guid isPermaLink="true">https://forum.qt.io/post/287958</guid><dc:creator><![CDATA[Goffer]]></dc:creator><pubDate>Thu, 27 Aug 2015 00:54:58 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt QDockWidget in a Layout is no more movable ... on Wed, 26 Aug 2015 20:41:17 GMT]]></title><description><![CDATA[<p dir="auto">You could have several QMainWindow in your stack as central widget if it's really what you need.</p>
<p dir="auto">Out of curiosity, why do you need all these QDockWidget that changes for every tab ?</p>
]]></description><link>https://forum.qt.io/post/287934</link><guid isPermaLink="true">https://forum.qt.io/post/287934</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 26 Aug 2015 20:41:17 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt QDockWidget in a Layout is no more movable ... on Wed, 26 Aug 2015 15:48:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi SGait !</p>
<p dir="auto">I know that it might affect is behavior but the thing with the normal <em>"dock area position"</em> is that it doesn't do what I want.</p>
<p dir="auto">If I switch tab, I will still have my docks visible as it is not part of the tab (in centralWidget) but part of the dockArea which is all around the centralWidget.<br />
And further more, I m not even sure that by using the dockArea , I could have a scroll bar.</p>
<p dir="auto">So, There is no way to make the out docked dockWidget movable ? except if I put it in a new widgetWindow (but I don't want to do that)?<br />
If i have to go for the new widgetWindow, then I prefer not to use the QDockWidget anymore as it becomes useless and simply do layouts that will be parented under my scrollArea or a new widgetWindow.</p>
]]></description><link>https://forum.qt.io/post/287906</link><guid isPermaLink="true">https://forum.qt.io/post/287906</guid><dc:creator><![CDATA[Goffer]]></dc:creator><pubDate>Wed, 26 Aug 2015 15:48:10 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt QDockWidget in a Layout is no more movable ... on Wed, 26 Aug 2015 13:19:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">You should put your dock widgets in the available QMainWindow's dock area. Putting it in a layout like you do makes it treated as a normal widget.</p>
]]></description><link>https://forum.qt.io/post/287882</link><guid isPermaLink="true">https://forum.qt.io/post/287882</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 26 Aug 2015 13:19:04 GMT</pubDate></item></channel></rss>