<?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[Set Width of a QWidget]]></title><description><![CDATA[<p dir="auto">Hi, Currently I returned to develop the app that I started two years ago. I am finishing the infrastructure but the UI has some issue that I want to fix.</p>
<p dir="auto">I have been reading a lot these days but I am a little bit lost.</p>
<p dir="auto">I am tryint to adjust te size of a tabWidget using the size of a Qtablewidget that I have inside one tab, but always the size goes to (0.0), 'm trying something like that:</p>
<p dir="auto">void MainWindow::on_tabWidget_tabBarClicked(int index)<br />
{<br />
QSize s;<br />
switch (index) {<br />
case 2:<br />
s = ui-&gt;rmTableWidget-&gt;size();<br />
ui-&gt;tabWidget-&gt;setMinimumWidth(s.width());<br />
ui-&gt;tabWidget-&gt;adjustSize();<br />
s = ui-&gt;tabWidget-&gt;size();<br />
break;<br />
default:<br />
break;<br />
}<br />
}</p>
<p dir="auto">Could someone tell me how I could set that size.</p>
<p dir="auto">Thank you very much in advanced.</p>
]]></description><link>https://forum.qt.io/topic/100058/set-width-of-a-qwidget</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 20:31:08 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/100058.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 23 Feb 2019 23:41:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Set Width of a QWidget on Sun, 24 Feb 2019 07:13:17 GMT]]></title><description><![CDATA[<p dir="auto">Use layouts, then UI will automatically adjust sizes of all elements.</p>
]]></description><link>https://forum.qt.io/post/513652</link><guid isPermaLink="true">https://forum.qt.io/post/513652</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Sun, 24 Feb 2019 07:13:17 GMT</pubDate></item></channel></rss>