Is there any limitations to how many points a QPolygonF can contain?
I have in my scene several polygons and when I use my "drawing tool" to draw some lines it crashes. But It only crashes when I add a polygon which contains 130188 points to be exact. If I don't add it everything works just fine.
I only uploaded the sourcefiles so it will not compile due to some dependencies I haven't included but I thought it would be better than printing whole classes in the thread?
This is how I populate the scene in graphicView.cpp
for(int i=0;i<shp.getPolygons().size();i++)
{
MapLine* t = new MapLine(shp.getPolygons()[i]);
scene->addItem(t);
}
for(int i=0;i<shp.getPolygons().size();i++)
{
MapLine* t = new MapLine(shp.getPolygons()[i]);
scene->addItem(t);
}
To copy to clipboard, switch view to plain text mode
And on this line it crashes in MyScene.cpp
QList<QGraphicsItem*> test = currentDrawItem->collidingItems(Qt::IntersectsItemShape);
QList<QGraphicsItem*> test = currentDrawItem->collidingItems(Qt::IntersectsItemShape);
To copy to clipboard, switch view to plain text mode
Bookmarks