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> m_scene = new QGraphicsScene();<br> setScene( m_scene );<br><br> setRenderHint( QPainter::Antialiasing );<br> setMouseTracking( true ); <br>
<br> setFrameShadow( QFrame::Sunken );<br> setFrameShape ( QFrame::Panel );<br>}<br>[/code]<br><br>The m_scene 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> return m_scene; // This object is same as set in View.cpp<br>}<br><br>void Draw::render()<br>{<br> .........// logic to extract items <br><br> m_scene->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 as inverted.<br>If I put clutch using [quote]scale(1,-1) [/quote] then it draw line and polygon correct but point shapefiles inverted.<br>
<br>Can any body explain me this strange behavior and solution to it.<br><br>Thanks :( <br><br>