[QGIS-Developer] Error with raster renderer in QGIS 3.10
Nyall Dawson
nyall.dawson at gmail.com
Sun Nov 17 19:41:27 PST 2019
On Thu, 14 Nov 2019 at 20:32, <SSchmidt at gfi-gis.de> wrote:
>
> Hello,
>
> in my plugin I set up a rasterlayer like this:
>
> QgsRasterLayer* lyr = new QgsRasterLayer(src->Dir + "/" + src->File, firstTBLayer->Title, QStringLiteral("gdal"));
> if (lyr->isValid())
> QgsProject::instance()->addMapLayers(QList<QgsMapLayer *>() << lyr, false);
> QgsRasterRenderer* rend = new QgsMultiBandColorRenderer(rLyr->dataProvider(), redBand, greenBand, blueBand);
> rLyr->setRenderer(rend);
This looks fine. It's likely there's something else at play, possibly
a local build issue.
Nyall
More information about the QGIS-Developer
mailing list