<?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[QGraphicscene changes size]]></title><description><![CDATA[<p dir="auto">Hello all,</p>
<p dir="auto">I encountered a problem with QGraphicsscene. I am making a simple pong game and using a graphicsscene where I put my items in. But when I want to reset the game and put all the items back in their original position the graphicsscine seems like it had gotten twice(or more) bigger. Is there a way to keep the scene always at the same size, I couldn't find anything about this on the internet.<br />
Thanks!</p>
]]></description><link>https://forum.qt.io/topic/89131/qgraphicscene-changes-size</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 15:26:14 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/89131.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Mar 2018 13:33:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QGraphicscene changes size on Mon, 26 Mar 2018 14:52:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a><br />
Thanks for the answer. This worked! Thank you!</p>
]]></description><link>https://forum.qt.io/post/449654</link><guid isPermaLink="true">https://forum.qt.io/post/449654</guid><dc:creator><![CDATA[Vera]]></dc:creator><pubDate>Mon, 26 Mar 2018 14:52:32 GMT</pubDate></item><item><title><![CDATA[Reply to QGraphicscene changes size on Mon, 26 Mar 2018 10:37:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vera">@<bdi>Vera</bdi></a><br />
Hi<br />
there are function to map from items coordinates to global and reverse<br />
QPointF QGraphicsItem::mapToScene(const QPointF &amp;point)<br />
That should report 400x300 for that item.</p>
<p dir="auto">Did you read<br />
<a href="http://doc.qt.io/qt-5/graphicsview.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/graphicsview.html</a><br />
The Graphics View Coordinate System ?</p>
]]></description><link>https://forum.qt.io/post/449613</link><guid isPermaLink="true">https://forum.qt.io/post/449613</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 26 Mar 2018 10:37:40 GMT</pubDate></item><item><title><![CDATA[Reply to QGraphicscene changes size on Mon, 26 Mar 2018 10:30:09 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your reply.<br />
And sorry for the late response.<br />
I set them both but that didn't seem to help, but I found out after a long search that the objects i put inside the scene get their own coordinate system. When I put an object in at 400, 300 it is there but when it has moved and I want it back at its original place I have to set it position to 0,0 to reset it. This is really annoying as I cant use the dimension of the scene to check if the ball in the game has a collision with the top wall.<br />
Is there a way to have the objects always use the coordinate system from the scene?</p>
]]></description><link>https://forum.qt.io/post/449610</link><guid isPermaLink="true">https://forum.qt.io/post/449610</guid><dc:creator><![CDATA[Vera]]></dc:creator><pubDate>Mon, 26 Mar 2018 10:30:09 GMT</pubDate></item><item><title><![CDATA[Reply to QGraphicscene changes size on Fri, 23 Mar 2018 14:14:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vera">@<bdi>Vera</bdi></a><br />
QGraphicsView::setScreneRect()<br />
QGraphicsScene::setSceneRect()</p>
<p dir="auto">If one those are not set the default value is the bounding rect of all child items.</p>
]]></description><link>https://forum.qt.io/post/449222</link><guid isPermaLink="true">https://forum.qt.io/post/449222</guid><dc:creator><![CDATA[raven-worx]]></dc:creator><pubDate>Fri, 23 Mar 2018 14:14:05 GMT</pubDate></item></channel></rss>