<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    The layer is loading in the legend and shown in the main window. <br>
    What do you mean, with the symbology. In front of the layer, in the
    legend, is a raster icon, if you mean this.<br>
    <br>
    I copied the code from the slot to the building of the ui. so the
    layer is loading in the canvas by building the gui and not by
    clicking in the toolbar. <br>
    <br>
    If I start qgis with this state of code, its starts and load load
    the layer, when I start the plugin the canvas is still white and
    when I clicked on the starting picture of qgis which is still there,
    the layer is shown in the canvas of the plugin. <br>
    <br>
    It's confusing me.<br>
    <br>
    Felix <br>
    <br>
    <div class="moz-cite-prefix">Am 05.06.2014 20:20, schrieb Tim
      Sutton:<br>
    </div>
    <blockquote
cite="mid:CALCNqkaoOPXdih_=6Gxv206f-rWwyjVjaT=i=CpuATFR7obB5g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi
        <div><br>
        </div>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Fri, Jun 6, 2014 at 12:15 AM,
            Felix Schmidt <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:felix.schmidt@uni-weimar.de"
                target="_blank">felix.schmidt@uni-weimar.de</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Same
              mistake with refresh() at the end.<br>
              <br>
              Am 05.06.2014 19:11, schrieb Rouzaud Denis:
              <div class="HOEnZb">
                <div class="h5"><br>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    self.canvasRaster.refresh() at the end ?<br>
                    <br>
                    On 05 Jun 2014, at 18:27, Felix Schmidt <<a
                      moz-do-not-send="true"
                      href="mailto:felix.schmidt@uni-weimar.de"
                      target="_blank">felix.schmidt@uni-weimar.de</a>>
                    wrote:<br>
                    <br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <br>
                      <br>
                      <br>
                      Hello everyone,<br>
                      I try to load on signal, a rasterlayer to
                      qgsmapcanvas. I try it like in<br>
                      the pycookbook:<br>
                      <br>
                      @QtCore.pyqtSlot()<br>
                           def loadRasterImage(self):<br>
                           print "slot works"<br>
                               fileName = QFileDialog.getOpenFileName(None,
                      "historical map",<br>
                      ".", "Image Files (*.png *.jpg *.bmp *.tiff)")<br>
                               fileInfo = QFileInfo(fileName)<br>
                               baseName = fileInfo.baseName()<br>
                               rlayer = QgsRasterLayer(fileName,
                      baseName)<br>
                               if not rlayer.isValid():<br>
                                   print "Layer failed to load!"<br>
                               QgsMapLayerRegistry.instance().addMapLayer(rlayer)<br>
                           print rlayer.extent().yMinimum()<br>
                           self.canvasRaster.setExtent(rlayer.extent())<br>
                           self.canvasRaster.setLayerSet( [
                      QgsMapCanvasLayer(rlayer) ] )<br>
                      <br>
                      self.canvasRaster is defined in the gui . I search
                      for 8h but I dont<br>
                      find a solutionen, because there are no errors.<br>
                      <br>
                      It load the rasterlayer to the main program of
                      qgis, but not in my<br>
                      qgsmapcanvas. it is still white.<br>
                      <br>
                    </blockquote>
                  </blockquote>
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Is the layer loaded, showing in the legend but just not
              visible? Check the symbology for the layer is defined
              properly if this is the case.</div>
            <div><br>
            </div>
            <div>Regards</div>
            <div><br>
            </div>
            <div>Tim</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div class="HOEnZb">
                <div class="h5">
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      please help me.<br>
                      <br>
                      Felix<br>
                      <br>
                      <br>
                      <br>
                      _______________________________________________<br>
                      Qgis-developer mailing list<br>
                      <a moz-do-not-send="true"
                        href="mailto:Qgis-developer@lists.osgeo.org"
                        target="_blank">Qgis-developer@lists.osgeo.org</a><br>
                      <a moz-do-not-send="true"
                        href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
                        target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
                    </blockquote>
                  </blockquote>
                  <br>
                  _______________________________________________<br>
                  Qgis-developer mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:Qgis-developer@lists.osgeo.org"
                    target="_blank">Qgis-developer@lists.osgeo.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
                    target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div dir="ltr">Tim Sutton - QGIS Project Steering Committee
            Member<br>
            ==============================================<br>
            Please do not email me off-list with technical<br>
            support questions. Using the lists will gain<br>
            more exposure for your issues and the knowledge<br>
            surrounding your issue will be shared with all.<br>
            <br>
            Irc: timlinux on #qgis at <a moz-do-not-send="true"
              href="http://freenode.net" target="_blank">freenode.net</a><br>
            ==============================================</div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>