<?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[[SOLVED] Rotate border-image]]></title><description><![CDATA[<p dir="auto">Hey, my application has a lot of custom widgets that have a border-image.<br />
But I want some of those widgets to show the image upside down.<br />
Can this be done via the stylesheet?</p>
<p dir="auto">Thank you!</p>
]]></description><link>https://forum.qt.io/topic/31849/solved-rotate-border-image</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 05:46:44 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/31849.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Sep 2013 14:43:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] Rotate border-image on Thu, 12 Sep 2013 08:19:40 GMT]]></title><description><![CDATA[<p dir="auto">Hey, I got it working by adding your code to my paintEvent code.<br />
Thank you!</p>
]]></description><link>https://forum.qt.io/post/195083</link><guid isPermaLink="true">https://forum.qt.io/post/195083</guid><dc:creator><![CDATA[secondVISION]]></dc:creator><pubDate>Thu, 12 Sep 2013 08:19:40 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Rotate border-image on Wed, 11 Sep 2013 16:29:46 GMT]]></title><description><![CDATA[<p dir="auto">Seems that it is not possible using stylsheets.<br />
But if you have overridden paintevent method in your custom widgets, you can use QTransform and QPainter to rotate the image by 180 degree to make it upside down.<br />
Example code:</p>
<p dir="auto">@QPainter painter;<br />
QPointF c = rect().center();<br />
QTransform t;<br />
t.translate(c.x(), c.y());<br />
t.rotate(180, Qt::XAxis);<br />
t.translate(-c.x(), -c.y());<br />
painter.setTransform(t);@</p>
]]></description><link>https://forum.qt.io/post/195014</link><guid isPermaLink="true">https://forum.qt.io/post/195014</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Wed, 11 Sep 2013 16:29:46 GMT</pubDate></item></channel></rss>