<?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 to change size of QWidget by connect(button...)]]></title><description><![CDATA[<p dir="auto">Please help with two problems.<br />
1)I need to connect one of buttons of this class with changing size of myWindow by consts. (for exaplme setSize(x*y) ).</p>
<p dir="auto">@class MyWindow : public QWidget, public Ui::MyWindow<br />
{<br />
Q_OBJECT<br />
//...<br />
}<br />
@<br />
2) And how I can prevent to user to change the size?<br />
@layout()-&gt;setSizeConstraint(QLayout::SetFixedSize);@<br />
is't work. It crashes the program:<br />
@<br />
Runs MyWindow.exe ....<br />
The program terminated unexpectedly.<br />
MyWindow.exe exited with code -1073741819<br />
@</p>
]]></description><link>https://forum.qt.io/topic/25787/how-to-change-size-of-qwidget-by-connect-button</link><generator>RSS for Node</generator><lastBuildDate>Tue, 04 Aug 2026 13:08:37 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/25787.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Apr 2013 16:10:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to change size of QWidget by connect(button...) on Mon, 01 Apr 2013 17:27:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/void">@<bdi>void</bdi></a> MyWindow::sizeBigger()<br />
{<br />
this-&gt;setFixedSize(477, 250);<br />
groupBox_3-&gt;show();<br />
}<br />
void MyWindow::sizeSmoller()<br />
{<br />
this-&gt;setFixedSize(477, 180);<br />
groupBox_3 -&gt; hide();<br />
}<br />
@<br />
Is work, thank you! But, after sizeSmoller all groupBoxes become Black.<br />
groupBox_3 - lowest groupBox.<br />
!<a href="http://i.imgur.com/iRz9Egdl.jpg(Problem)" target="_blank" rel="noopener noreferrer nofollow ugc">http://i.imgur.com/iRz9Egdl.jpg(Problem)</a>!</p>
]]></description><link>https://forum.qt.io/post/172346</link><guid isPermaLink="true">https://forum.qt.io/post/172346</guid><dc:creator><![CDATA[freelife]]></dc:creator><pubDate>Mon, 01 Apr 2013 17:27:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to change size of QWidget by connect(button...) on Mon, 01 Apr 2013 17:03:08 GMT]]></title><description><![CDATA[<p dir="auto">Ok, but I need to connect it. That's method, not slot. Sorry for quations like this I have not perfect English.</p>
]]></description><link>https://forum.qt.io/post/172344</link><guid isPermaLink="true">https://forum.qt.io/post/172344</guid><dc:creator><![CDATA[freelife]]></dc:creator><pubDate>Mon, 01 Apr 2013 17:03:08 GMT</pubDate></item><item><title><![CDATA[Reply to How to change size of QWidget by connect(button...) on Mon, 01 Apr 2013 16:45:52 GMT]]></title><description><![CDATA[<p dir="auto">"QWidget::setFixedSize":<a href="http://qt-project.org/doc/qt-4.8/qwidget.html#setFixedSize-2" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-4.8/qwidget.html#setFixedSize-2</a></p>
]]></description><link>https://forum.qt.io/post/172343</link><guid isPermaLink="true">https://forum.qt.io/post/172343</guid><dc:creator><![CDATA[beemaster]]></dc:creator><pubDate>Mon, 01 Apr 2013 16:45:52 GMT</pubDate></item></channel></rss>