<?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[Checkboxes in cells of QTableWidget are not coming correctly]]></title><description><![CDATA[<p dir="auto">I have following code</p>
<p dir="auto">QTableWidget* t = new QTableWidget;<br />
t-&gt;setRowCount(2)l</p>
<p dir="auto">QCheckBox* chkbox0 = new QCheckBox;<br />
QCheckBox* chkbox1 = new QCheckBox;</p>
<p dir="auto">int col =0;<br />
QWidget* wdg = new QWidget;<br />
QHBoxLayout* layout  = new QHBoxLayout(wdg);<br />
layout-&gt;addWidget(chkbox0);<br />
wdg-&gt;setLayout(layout);<br />
t-&gt;setCellWidget(0, col, wdg);</p>
<p dir="auto">QWidget* wdg1 = new QWidget;<br />
QHBoxLayout* layout1  = new QHBoxLayout(wdg1);<br />
layout1-&gt;addWidget(chkbox1);<br />
wdg1-&gt;setLayout(layout);<br />
t-&gt;setCellWidget(1, col, wdg1);</p>
<p dir="auto">The checkboxes are not correctly properly the image is not coming proper<br />
the boundaries of checkboxes in the cell are not coming proper</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/0df6b743-fe1b-4dcb-9008-785ebdedf354.png" alt="0_1546975423936_1.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I tried to increase the row height setRowHeight , it did not work out .</p>
<p dir="auto">Any suggestions would help</p>
]]></description><link>https://forum.qt.io/topic/98322/checkboxes-in-cells-of-qtablewidget-are-not-coming-correctly</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 05:53:00 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/98322.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Jan 2019 19:25:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Checkboxes in cells of QTableWidget are not coming correctly on Tue, 08 Jan 2019 19:40:00 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
layout -&gt;setContentsMargins(0,0,0,0);<br />
is the cure.<br />
The default margins cuts the checkbox.</p>
]]></description><link>https://forum.qt.io/post/503444</link><guid isPermaLink="true">https://forum.qt.io/post/503444</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Tue, 08 Jan 2019 19:40:00 GMT</pubDate></item></channel></rss>