Hi again,<br><br>I could solve my problem. After commenting these three lines ECW file type loaded successfully, however DEM file type will be shown in gray.<br><br>// myLayer->setDrawingStyle( QgsRasterLayer::SingleBandPseudoColor );<br>
// myLayer->setColorShadingAlgorithm( QgsRasterLayer::PseudoColorShader );<br>// myLayer->setContrastEnhancementAlgorithm(QgsContrastEnhancement::StretchToMinimumMaximum, false );<br><br>hope this help somebody in future.<br>
<br>Cheers,<br><br>-Sam<br><br><div class="gmail_quote">On Wed, Feb 22, 2012 at 7:22 PM, forum account <span dir="ltr"><<a href="mailto:omgforum2012@gmail.com">omgforum2012@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br>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.<br>To create my own gis application I started looking into code examples available at <a href="https://svn.osgeo.org/qgis/trunk/code_examples/" target="_blank">https://svn.osgeo.org/qgis/trunk/code_examples/</a><br>
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.<br>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?!<br>
I really appreciate your help in advance.<br><br>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.<br><br>-Sam<br>
</blockquote></div><br>