Sorry for the spam. I think I found my answer.<div><br></div><div>just in case if anyone has a similar problem, this is how I solved it.</div><div><br><div>Turns out QWidget doesn&#39;t support border-radius stylesheet property.</div>
<div>So I had to set a mask:</div><div><br></div><div><br><div>void setWidgetBorderRadius(QWidget* widget, int radius) {</div><div>    </div><div>    // cache widget with and height</div><div>    int width = widget-&gt;width();</div>
<div>    int height = widget-&gt;height();</div><div>    </div><div>    // Initialize a rectangular masked region</div><div>    QRegion region(0, 0, width, height, QRegion::Rectangle);</div><div>    </div><div>    // now clip off the sharp edges</div>
<div> </div><div>    // top left</div><div>    QRegion round (0, 0, 2*radius, 2*radius, QRegion::Ellipse);</div><div>    QRegion corner(0, 0, radius, radius, QRegion::Rectangle);</div><div>    region = region.subtracted(corner.subtracted(round));</div>
<div> </div><div>    // top right</div><div>    round = QRegion(width-2*radius, 0, 2*radius, 2*radius, QRegion::Ellipse);</div><div>    corner = QRegion(width-radius, 0, radius, radius, QRegion::Rectangle);</div><div>    region = region.subtracted(corner.subtracted(round));</div>
<div> </div><div>    // bottom right</div><div>    round = QRegion(width-2*radius, height-2*radius, 2*radius, 2*radius, QRegion::Ellipse);</div><div>    corner = QRegion(width-radius, height-radius, radius, radius, QRegion::Rectangle);</div>
<div>    region = region.subtracted(corner.subtracted(round));</div><div> </div><div>    // bottom left</div><div>    round = QRegion(0, height-2*radius, 2*radius, 2*radius, QRegion::Ellipse);</div><div>    corner = QRegion(0, height-radius, radius, radius, QRegion::Rectangle);</div>
<div>    region = region.subtracted(corner.subtracted(round));</div><div> </div><div>    // Set mask</div><div>    widget-&gt;setMask(region);</div><div>}</div><div><br></div>References:<br><a href="http://qt-project.org/doc/qt-5.0/stylesheet-reference.html">http://qt-project.org/doc/qt-5.0/stylesheet-reference.html</a><br>
<a href="http://www.qtcentre.org/threads/44316-Rounded-corners-for-a-QWidget?s=fd88b7c4e59f4487a5457db551f3df2c">http://www.qtcentre.org/threads/44316-Rounded-corners-for-a-QWidget?s=fd88b7c4e59f4487a5457db551f3df2c</a><br>

<br><br><div class="gmail_quote">On Tue, Aug 21, 2012 at 10:22 PM, somi <span dir="ltr">&lt;<a href="mailto:seesomi@gmail.com" target="_blank">seesomi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,
<div>I am trying to use a QVTKWidget in a QT  UI file. In QTcreator, I am able to set the border radius</div><div>to some value via stylesheets to get a rounded borders. In QTCreator I can see the rounded </div><div>borders. However on running the program QVTKWidget ignores the border radius and renders as a rectangle. </div>

<div><br></div><div>Am I missing something trivial ? what would be the best way for QVTKWidget to render</div><div>rounded corners ?</div><div><br></div><div>Thanks,</div><div>somi</div><div><br></div>
</blockquote></div><br></div></div>