Hi again, I could solve my problem. After commenting these three lines ECW file type loaded successfully, however DEM file type will be shown in gray.
// myLayer->setDrawingStyle( QgsRasterLayer::SingleBandPseudoColor ); // myLayer->setColorShadingAlgorithm( QgsRasterLayer::PseudoColorShader ); // myLayer->setContrastEnhancementAlgorithm(QgsContrastEnhancement::StretchToMinimumMaximum, false ); hope this help somebody in future. Cheers, -Sam On Wed, Feb 22, 2012 at 7:22 PM, forum account <[email protected]>wrote: > Hi, > > I'm new to QGIS. I was able to compile GDAL 1.8.1 with ecw support on > ubuntu, then I built QGIS from source and now I'm able to load ECW file > types. > To create my own gis application I started looking into code examples > available at https://svn.osgeo.org/qgis/trunk/code_examples/ > I tried 1_hello_world_qgis_style and it worked fine for SHP file types. > Then I tried 4_adding_rasters_to_canvas and built it from source in > QtCreator. > I'm able to load TIFF and DEM file types but I can't load ECW file types. > I traced QGIS source code but I couldn't find any special difference > between QGIS and the example code. Should I add some extra code to the > example project to enable ECW support?! > I really appreciate your help in advance. > > PS: I'm sending this email to both user and developer mailing list, so I'm > sorry if you receive this email more than once. > > -Sam >
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
