<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><code>I have been trying hard to find how to get access to the object I stored in a QMultiMap container. I am able to retrieve the numbered keys but when I try accessing the object QGIS crashes. <br><br>I have done similar work in plain C++ and it has worked with out any problem, I used regualr multimap before. Here I tried both QT multimap and regualr multimap and while trying to access the second item in the iterator QGIS seems to give up. Any help will be appreciated. I have pasted a piece of the code below, <br><br><br> typedef QMultiMap<long,QgsPoint> mmaplngQPt;<br>// QgsPoint map iterator objects<br> typedef mmaplngQPt::iterator maplngQPtit1, maplngQPtit2;<br> mmaplngQPt::iterator Pt1Qmapit, Pt2Qmapit,itQlow, itQup;<br> typedef pair < long, QgsPoint > QPt_pair;<br>
mmaplngPt mapQPt,mapQPt0,mapQPt1;<br> mmaplngPt::iterator mapQPtit;<br> long iKey;<br> int lbx,ubx;<br> QgsPoint vx;<br><br> itQlow=mapQPt.lowerBound (lbX);<br> itQup=mapQPt.upperBound (ubX);<br><br> for ( mapQPtit=itQlow ; mapQPtit != itQup; mapQPtit++ ) <br> {<br><br> txtStream <<"key = "<<itQlow.key()<<endl;<br> iKey = (QPt1mapit).key();<br>
vx = (QPt1mapit).value();<br><br> }<br><br><br><br>The program crashes write after it prints the key value. By the way any way of finding a meaningful error message in QGIS?<br><br>Thank you,<br><br>Maaza<br></code></td></tr></table>