Hi all,<br><br>I am trap in a strange problem while rendering shapefiles. <br><br>I am used some code of [quote]qgsmapcanvas.cpp [/quote] for creating Graphicsview and QGraphicsScene.<br><br>The code I have wrote is as follow:<br>
[code]<br>View::View( QWidget *parent ): QGraphicsView( parent )<br>{<br><br>&nbsp;&nbsp;&nbsp; m_scene = new QGraphicsScene();<br>&nbsp;&nbsp;&nbsp; setScene( m_scene );<br><br>&nbsp;&nbsp;&nbsp; setRenderHint( QPainter::Antialiasing );<br>&nbsp;&nbsp;&nbsp; setMouseTracking( true ); <br>
&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; setFrameShadow( QFrame::Sunken );<br>&nbsp;&nbsp;&nbsp; setFrameShape ( QFrame::Panel&nbsp; );<br>}<br>[/code]<br><br>The m_scene&nbsp; set here is used in other CPP file where items are added to scene. The code is as follow:<br><br>[code]<br>
<br>QGraphicsScene *Draw::scene() const<br>{<br>&nbsp;&nbsp;&nbsp; return m_scene; // This object is same as set in View.cpp<br>}<br><br>void Draw::render()<br>{<br>&nbsp;.........//&nbsp; logic to extract items <br><br>&nbsp; m_scene-&gt;addItem( item ); //Here item is QGraphicsItem<br>
}<br>[/code]<br><br>The problem is that only point Shapfiles are drawing correctly.<br>The line and polygon shapefiles are drawn&nbsp;&nbsp; as inverted.<br>If I put clutch using [quote]scale(1,-1) [/quote]&nbsp; then it draw line and polygon correct but point shapefiles inverted.<br>
<br>Can any body explain me this strange behavior&nbsp;&nbsp; and solution to it.<br><br>Thanks :( <br><br>