On Thu, Feb 3, 2011 at 3:46 PM, Federico J. Fernández <federico.fernan...@gmail.com> wrote: >> >> In what context do you call the selectedFeatures() method, what is the >> expected result and what do you get instead? > > I get the correct values. > > I call it in a slot that is called when the user clicks the map with an > EmitPoint tool. But when the method ends and then the QList is destroyed, > the application aborts. I think that it has to do with the ownership of the > features, but it is strange because I'm getting a copy of the list... I > can't still figure out what is the problem. If I use a newly allocated > pointer for the List, everything works fine until I delete that object.
I'm confused - you don't have to allocate any pointers for the list. The QList class uses implicit sharing of data (like many other qt classes), so the list can be passed by value very cheaply. Please paste the code of the whole method if it's not too long and indicate on what line the application crashes. Martin _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer