<?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[adapting scrollarea when you expand or decrease intern widget]]></title><description><![CDATA[<p dir="auto">Hello all people :)</p>
<p dir="auto">I'm looking to expand widgets inside a scroll area.</p>
<p dir="auto">Enlarging widgets is easy but adapting the scroll area to the new size of the widgets it contains is a bit trickier.</p>
<p dir="auto">if you have idea, it's cool !</p>
]]></description><link>https://forum.qt.io/topic/117654/adapting-scrollarea-when-you-expand-or-decrease-intern-widget</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Mar 2026 20:04:10 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/117654.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Aug 2020 08:46:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Thu, 03 Sep 2020 14:49:54 GMT]]></title><description><![CDATA[<p dir="auto">to be sure I did a test I changed the shape layout to see if the widgets would follow the modification.<br />
And yes if I change the layout vertically my widgets adapt and the same for other formats, which proves that the widgets are in this layout.</p>
]]></description><link>https://forum.qt.io/post/615638</link><guid isPermaLink="true">https://forum.qt.io/post/615638</guid><dc:creator><![CDATA[Albator]]></dc:creator><pubDate>Thu, 03 Sep 2020 14:49:54 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Wed, 02 Sep 2020 18:18:02 GMT]]></title><description><![CDATA[<p dir="auto">Then maybe another silly question: are you sure your widgets are put in that layout ?</p>
]]></description><link>https://forum.qt.io/post/615511</link><guid isPermaLink="true">https://forum.qt.io/post/615511</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 02 Sep 2020 18:18:02 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Wed, 02 Sep 2020 07:48:20 GMT]]></title><description><![CDATA[<p dir="auto">i up the post</p>
]]></description><link>https://forum.qt.io/post/615397</link><guid isPermaLink="true">https://forum.qt.io/post/615397</guid><dc:creator><![CDATA[Albator]]></dc:creator><pubDate>Wed, 02 Sep 2020 07:48:20 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Wed, 05 Aug 2020 07:09:07 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/ff7ee0f0-bddf-4598-8fcc-64dd07c984b6.png" alt="scroll8.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">of course i do</p>
]]></description><link>https://forum.qt.io/post/610616</link><guid isPermaLink="true">https://forum.qt.io/post/610616</guid><dc:creator><![CDATA[Albator]]></dc:creator><pubDate>Wed, 05 Aug 2020 07:09:07 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Tue, 04 Aug 2020 17:54:24 GMT]]></title><description><![CDATA[<p dir="auto">I might be wrong but it looks like you are not using a layout on scrollAreaWidgetContents_2, are you ?</p>
]]></description><link>https://forum.qt.io/post/610549</link><guid isPermaLink="true">https://forum.qt.io/post/610549</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 04 Aug 2020 17:54:24 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Tue, 04 Aug 2020 13:00:59 GMT]]></title><description><![CDATA[<p dir="auto">I'll look at the SO link ;)<br />
then it's just in case I enlarge the widgets during the application run with the "grow graph" button.</p>
<p dir="auto">By setting the minimunsize parameter of my graph widgets to very wide and very high without using the buttons, the scroll area works fine so it's probably possible.</p>
<p dir="auto">parameters widgets graph :<br />
<img src="https://ddgobkiprc33d.cloudfront.net/d3835836-1206-45a9-855f-2964498d1df2.png" alt="scroll6.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">and the result :<br />
<img src="https://ddgobkiprc33d.cloudfront.net/efd6cb11-0103-422a-8553-c1f3fb049f72.png" alt="scroll7.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">the problem it's just when i use the resize with button.</p>
<p dir="auto">i will try with adjustsize :)</p>
<p dir="auto">EDIT :<br />
adjustsize() doesn't work</p>
]]></description><link>https://forum.qt.io/post/610456</link><guid isPermaLink="true">https://forum.qt.io/post/610456</guid><dc:creator><![CDATA[Albator]]></dc:creator><pubDate>Tue, 04 Aug 2020 13:00:59 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Tue, 04 Aug 2020 10:07:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/albator">@<bdi>Albator</bdi></a><br />
That stuff look about right.<br />
The <strong>SO</strong> (<strong>StackOverflow</strong>) link was the</p>
<blockquote>
<p dir="auto"><a href="https://stackoverflow.com/questions/12781407/how-do-i-resize-the-contents-of-a-qscrollarea-as-more-widgets-are-placed-inside" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/12781407/how-do-i-resize-the-contents-of-a-qscrollarea-as-more-widgets-are-placed-inside</a> may be useful reading for you.</p>
</blockquote>
<p dir="auto">I think you should read that, though I believe you have done the necessary.</p>
<blockquote>
<p dir="auto"><code>//ui-&gt;scrollAreaWidgetContents-&gt;update();</code></p>
</blockquote>
<p dir="auto">I think you should try <code>ui-&gt;scrollAreaWidgetContents-&gt;adjustSize()</code> in case that resolves.</p>
<p dir="auto">I admit at this point I'm not sure!  I try playing about with scroll settings till they work :)  I don't know why you are getting a horizontal scrollbar but not a vertical one.</p>
]]></description><link>https://forum.qt.io/post/610438</link><guid isPermaLink="true">https://forum.qt.io/post/610438</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 04 Aug 2020 10:07:43 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Tue, 04 Aug 2020 09:49:43 GMT]]></title><description><![CDATA[<p dir="auto">okay so :<br />
1-<br />
when i create a scroll area with the design  interface I don't know how to look at the code it created.<br />
2-<br />
<img src="https://ddgobkiprc33d.cloudfront.net/a2d62843-4fd5-4efe-b47f-eb361c64d0dd.png" alt="scroll5.png" class=" img-fluid img-markdown" /><br />
yes, in the scroll area i have put a vertical  layout.<br />
3-<br />
<img src="https://ddgobkiprc33d.cloudfront.net/5930ec25-98b7-4947-bc24-b6fb2aeade82.png" alt="scroll4.png" class=" img-fluid img-markdown" /><br />
is enable<br />
4-<br />
What is SO link ?</p>
<p dir="auto">sorry in advance for my ignorance !</p>
]]></description><link>https://forum.qt.io/post/610432</link><guid isPermaLink="true">https://forum.qt.io/post/610432</guid><dc:creator><![CDATA[Albator]]></dc:creator><pubDate>Tue, 04 Aug 2020 09:49:43 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Tue, 04 Aug 2020 09:41:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/albator">@<bdi>Albator</bdi></a><br />
I don't know what code that generates.  Did that create a "holding" <code>QWidget</code> to drop your widgets onto?  Did you put a layout onto that "holding" widget when you added your sub-widgets?  Also what about the <code>setWidgetResizable()</code> setting?  Did you look at the <strong>SO</strong> link?</p>
]]></description><link>https://forum.qt.io/post/610431</link><guid isPermaLink="true">https://forum.qt.io/post/610431</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 04 Aug 2020 09:41:48 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Tue, 04 Aug 2020 09:38:10 GMT]]></title><description><![CDATA[<p dir="auto">I added it from the mainwindows.ui design interface and drop the widgets in the scroll area.</p>
]]></description><link>https://forum.qt.io/post/610430</link><guid isPermaLink="true">https://forum.qt.io/post/610430</guid><dc:creator><![CDATA[Albator]]></dc:creator><pubDate>Tue, 04 Aug 2020 09:38:10 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Tue, 04 Aug 2020 09:31:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/albator">@<bdi>Albator</bdi></a><br />
You do not tell us how you are creating/adding your widgets.  a <code>QScrollArea</code> only accepts a <em>single</em> widget to scroll, you talk about your 3 widgets, how are you adding those on the scroll area?</p>
<p dir="auto">Further, we do not know what your <code>QScrollArea::setWidgetResizable()</code> setting is.</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/12781407/how-do-i-resize-the-contents-of-a-qscrollarea-as-more-widgets-are-placed-inside" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/12781407/how-do-i-resize-the-contents-of-a-qscrollarea-as-more-widgets-are-placed-inside</a> may be useful reading for you.</p>
]]></description><link>https://forum.qt.io/post/610426</link><guid isPermaLink="true">https://forum.qt.io/post/610426</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 04 Aug 2020 09:31:01 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Tue, 04 Aug 2020 07:25:13 GMT]]></title><description><![CDATA[<p dir="auto">okay, with picture it's more explicative</p>
<p dir="auto">first i have this :<br />
<img src="https://ddgobkiprc33d.cloudfront.net/4770ee00-5e0b-4b3b-a43a-55af6131bbf9.png" alt="scroll1.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">3 widgets "graph" in a scroll area.<br />
with grow graph i expand the 3 widgets in the scroll area.</p>
<pre><code>void MainWindow::on_grow_clicked()
{
    int w,h;
    w=2500;
    h=600;

    QSize grow_size(w,h);

    ui-&gt;graph-&gt;resize(grow_size);
    ui-&gt;graph2-&gt;resize(grow_size);
    ui-&gt;graph3-&gt;resize(grow_size);

    //ui-&gt;scrollAreaWidgetContents-&gt;update();

}

</code></pre>
<p dir="auto">the 3 widgets grow correctly but :<br />
<img src="https://ddgobkiprc33d.cloudfront.net/3ccfd51b-a9c9-4f32-8a5b-e02470b1f069.png" alt="scroll2.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">it's not perfect, i would like this when i grow graph :<br />
<img src="https://ddgobkiprc33d.cloudfront.net/d1225996-810c-42a6-bff8-9aff0bbf681f.png" alt="scroll3.png" class=" img-fluid img-markdown" /><br />
with the scroll vertical</p>
]]></description><link>https://forum.qt.io/post/610392</link><guid isPermaLink="true">https://forum.qt.io/post/610392</guid><dc:creator><![CDATA[Albator]]></dc:creator><pubDate>Tue, 04 Aug 2020 07:25:13 GMT</pubDate></item><item><title><![CDATA[Reply to adapting scrollarea when you expand or decrease intern widget on Mon, 03 Aug 2020 18:57:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Can you explain what do you mean by adapting the scroll area ?</p>
]]></description><link>https://forum.qt.io/post/610318</link><guid isPermaLink="true">https://forum.qt.io/post/610318</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 03 Aug 2020 18:57:34 GMT</pubDate></item></channel></rss>