[QGIS-Developer] QgsRasterHistogram Python bindings
Nyall Dawson
nyall.dawson at gmail.com
Tue Aug 1 02:08:58 PDT 2017
On 1 August 2017 at 17:40, Alexander Bruy <alexander.bruy at gmail.com> wrote:
> Hi,
>
> while working on Processing algorithms I have found an issue with
> QgsRasterHistogram class. According to the documentation, member
> histogramVector should not be available in Python [0], but it is present
> in the corresponding SIP file. However, any attempt to access this member
> leads to QGIS crash.
>
> Should we remove histogramVector from Python? Or it should be exposed
> and there is a bug/incomplete implementation in bindings?
That's odd - there's nothing particularly unusal about
HistogramVector. A vector of ints should be accessibly from Python.
Why not try removing the typedef use from the sip file and see if that
helps? E.g.
#ifndef SIP_RUN
HistogramVector histogramVector;
#else
QVector<int> histogramVector;
#endif
Nyall
>
> [0] http://qgis.org/api/classQgsRasterHistogram.html#a9bd23abeb4764f3a6c73975ee96fd4ff
>
> --
> Alexander Bruy
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the QGIS-Developer
mailing list