<?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[Problem with mouseMoveEvent]]></title><description><![CDATA[<p dir="auto">i have some trouble working with the "QGraphicsSceneMouseEvent" that is passed to the mouseMoveEvent of my class.</p>
<p dir="auto">here is the code:<br />
@#include "Definitions.h"<br />
#include &lt;QGraphicsScene&gt;</p>
<p dir="auto">class QGraphicsSceneGrid : public QGraphicsScene<br />
{<br />
public:<br />
QGraphicsSceneGrid(QObject <em>parent);<br />
EN_EDIT_MODES</em> pen_current_mode;</p>
<p dir="auto">protected:<br />
void drawBackground(QPainter * painter, const QRectF &amp; rect );<br />
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);</p>
<p dir="auto">};@</p>
<p dir="auto">@#include "ModClasses.h"<br />
#include &lt;QPainter&gt;<br />
#include "Definitions.h"</p>
<p dir="auto">QGraphicsSceneGrid::QGraphicsSceneGrid(QObject *parent ) : QGraphicsScene(parent)<br />
{}</p>
<p dir="auto">void QGraphicsSceneGrid::mouseMoveEvent(QGraphicsSceneMouseEvent *event)<br />
{<br />
if( *pen_current_mode == mode_add_line )<br />
{<br />
QPointF pos1;<br />
pos1 = event-&gt;scenePos();<br />
}<br />
}<br />
@</p>
<p dir="auto">the line "pos1 = event-&gt;scenePos();" gives me this errors:</p>
<p dir="auto">In member function 'virtual void QGraphicsSceneGrid::mouseMoveEvent(QGraphicsSceneMouseEvent*)':<br />
error: invalid use of incomplete type 'struct QGraphicsSceneMouseEvent'<br />
error: forward declaration of 'struct QGraphicsSceneMouseEvent'</p>
]]></description><link>https://forum.qt.io/topic/13570/problem-with-mousemoveevent</link><generator>RSS for Node</generator><lastBuildDate>Wed, 06 May 2026 13:37:01 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/13570.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Jan 2012 14:15:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with mouseMoveEvent on Mon, 30 Jan 2012 20:36:53 GMT]]></title><description><![CDATA[<p dir="auto">thanks.<br />
(I thought ever QGraphicsSceneXXXX stuff is included in the QGraphicsScene header.)</p>
]]></description><link>https://forum.qt.io/post/127555</link><guid isPermaLink="true">https://forum.qt.io/post/127555</guid><dc:creator><![CDATA[Artemus]]></dc:creator><pubDate>Mon, 30 Jan 2012 20:36:53 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with mouseMoveEvent on Mon, 30 Jan 2012 14:27:54 GMT]]></title><description><![CDATA[<p dir="auto">@<br />
#include &lt;QGraphicsSceneMouseEvent&gt;<br />
@</p>
]]></description><link>https://forum.qt.io/post/127506</link><guid isPermaLink="true">https://forum.qt.io/post/127506</guid><dc:creator><![CDATA[cincirin]]></dc:creator><pubDate>Mon, 30 Jan 2012 14:27:54 GMT</pubDate></item></channel></rss>