[Qgis-developer] Problems using QgsVectorLayer::selectedFeatures()
Federico J. Fernández
federico.fernandez at gmail.com
Thu Feb 3 09:46:00 EST 2011
Thanks Martin for your answer. I'll try to explain better.
> I don't understand what's the problem. What do you mean by "an abort
> from the compiler" - does it mean that your code doesn't compile? Or
> is your application aborted at that point?
>
I tried to mean that my application aborted at that point.
> 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.
> Please describe your problem in more detail, otherwise we won't be
> able to help you.
>
Sorry, please fell free to ask further questions if it is still not clear.
Thanks again.
--
federico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110203/586249bf/attachment-0001.html
More information about the Qgis-developer
mailing list