<?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[ItemIgnoresTransformations and Positioning it on the Scene.]]></title><description><![CDATA[<p dir="auto">I'm having a bad time trying to center-align ( horizontally and vertically ) a QGraphicsSimpleTextItem that has the ItemIgnoresTransformations flags on.<br />
@<br />
item = new QGraphicsLineItem(pos, m.y1(), pos, m.y1() + tickSize, this);<br />
item-&gt;setPen(pen());<br />
ticks.push_back(item);</p>
<p dir="auto">label = new QGraphicsSimpleTextItem(textForValue(currValue), this);<br />
label-&gt;setBrush(QBrush(textColor));<br />
label-&gt;setFlag(ItemIgnoresTransformations);<br />
labels.push_back(label);<br />
@</p>
<p dir="auto">now, label-&gt;setPos ( Xpos - boundingRect().width() / 2, 0) doesn't works because the boundingRect of the item is not affected by the scene transforms. =/</p>
]]></description><link>https://forum.qt.io/topic/36265/itemignorestransformations-and-positioning-it-on-the-scene</link><generator>RSS for Node</generator><lastBuildDate>Wed, 06 May 2026 16:25:21 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/36265.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Jan 2014 18:17:59 GMT</pubDate><ttl>60</ttl></channel></rss>