<div dir="ltr"><div><div>Hi Loïc, <br></div>I have no luck with your fix. I'm getting the same exception.<br></div><div>The uic module doesn't recognize the property <span>QgsMapLayerProxyModel::RasterL<wbr>ayer </span>of the custom widget as valid. I tried to remove the entire property section from .ui file and set it programmatically during the dialog __init__ with<br>self.RasterLayer.setFilters(QgsMapLayerProxyModel.RasterLayer)<br></div><div>after setupUi but the widget does not load available layers...<br><br></div><div>Thanks anyway.<br></div><div>Enrico Ferreguti<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-28 22:12 GMT+02:00 L.Bartoletti <span dir="ltr"><<a href="mailto:lbartoletti@tuxfamily.org" target="_blank">lbartoletti@tuxfamily.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Hi,</p>
    <p>I have found the same problem on FreeBSD if custom widgets are
      not installed.</p>
    <p>My solution at least on FreeBSD and Windows (osgeo4w) use your
      .ui (it's only a XML), search this:</p>
    <p>  <customwidget><br>
         <class>YOUR CUSTOM WIDGET</class><br>
         <extends>YOUR CUSTOM WIDGET</extends><br>
         <header>YOUR CUSTOM WIDGET.h</header><br>
        </customwidget></p>
    <p>and change the line containing a C++ header: <br>
    </p>
    <p><header>YOUR CUSTOM WIDGET.h</header></p>
    <p> by :</p>
    <p><header>qgis.gui</header></p>
    <p><br>
    </p>
    <p>Regards.</p>
    <p>Loïc<br>
    </p><div><div class="h5">
    <br>
    <div class="m_8645376062070894936moz-cite-prefix">On 28.09.2017 16:54, Enrico Ferreguti
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>I'm getting the following exception:<br>
          <br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>AttributeError:
            unknown enum QgsMapLayerProxyModel::RasterL<wbr>ayer</span><br>
        </blockquote>
        <div><br>
          loading a plugin with QGIS custom QT designer widget in
          windows standalone QGIS 2.14 ltr and 2.18.<br>
          <br>
        </div>
        <div>The exception doesn't affect linux and osgeo4win
          installations.<br>
          <br>
        </div>
        <div>I found that this was a 2015 reported issue: <a href="https://issues.qgis.org/issues/13428" target="_blank">https://issues.qgis.org/<wbr>issues/13428</a><br>
        </div>
        <div>and I solve it as suggested in <a href="https://lists.osgeo.org/pipermail/qgis-developer/2015-September/039196.html" target="_blank">https://lists.osgeo.org/<wbr>pipermail/qgis-developer/2015-<wbr>September/039196.html</a>
          simply copying a file in the right place.<br>
          <br>
        </div>
        <div>The fix is apparently easy and considering that Qt custom
          widgets are widely used I can't figure why this old issue
          isn't yet solved.<br>
          <br>
        </div>
        <div>Is it a qgis or an osgeo4win issue? Should I reopen a
          ticket?<br>
          <br>
        </div>
        <div>Thanks. Enrico Ferreguti.<br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="m_8645376062070894936mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
QGIS-Developer mailing list
<a class="m_8645376062070894936moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="m_8645376062070894936moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a>
Unsubscribe: <a class="m_8645376062070894936moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br></div>