<div dir="ltr">Hi Jürgen!<div><br></div><div>I think that this can't be fixed by just setting the PYTHONPATH. </div><div><br></div><div>If I have understood right the problem is that PyQt and its uic module can't find qgis_customwidgets.py or better said 'qgis-dev\python\PyQt4\uic\widget-plugins' directory because it is not told to do so. It is not that some module can't be imported because it is not in pythonpath. Please correct me if I'm wrong.</div><div><br></div><div>Directories that are searched for widget plugins by PyQt4 are defined in uic.widgetPluginPath. I have not found any environment variable where this list can be altered.</div><div>After I appended "C:\OSGeo4W64\apps\qgis-dev\python\PyQt4\uic\widget-plugins" to the widgetPluginPath list I'm able to use uic.loadUiType function inside python. Still that doesn't solve the problem with pyuic4 because widgetPluginPath can't be set externally.</div><div><br></div><div><br></div><div>-Lauri</div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 19, 2015 at 12:47 PM, Jürgen E. <span dir="ltr"><<a href="mailto:jef@norbit.de" target="_blank">jef@norbit.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Lauri,<br>
<span class=""><br>
On Sat, 19. Sep 2015 at 12:11:11 +0300, Lauri Kajan wrote:<br>
> The actual problem might be that<br>
> C:\OSGeo4W64\apps\qgis-dev\python\PyQt4\uic\widget-plugins\qgis_customwidgets.py<br>
> file is not found by pyuic4.<br>
> After I copied that file<br>
> to C:\OSGeo4W64\apps\Python27\Lib\site-packages\PyQt4\uic\widget-plugins<br>
> everything works ok.<br>
><br>
> Is this a osgeo4w bug or could this be fixed by us?<br>
<br>
> Should the qgis postinstall bat copy qgis_customwidgets.py file to the<br>
> right place?<br>
<br>
</span>No, qgis-dev might not be the only installed version - so you have to setup the<br>
PYTHONPATH to use the version you target.<br>
<span class=""><font color="#888888"><br>
<br>
Jürgen<br>
<br>
--<br>
Jürgen E. Fischer           norBIT GmbH             Tel. <a href="tel:%2B49-4931-918175-31" value="+49493191817531">+49-4931-918175-31</a><br>
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. <a href="tel:%2B49-4931-918175-50" value="+49493191817550">+49-4931-918175-50</a><br>
Software Engineer           D-26506 Norden             <a href="http://www.norbit.de" rel="noreferrer" target="_blank">http://www.norbit.de</a><br>
QGIS release manager (PSC)  Germany                    IRC: jef on FreeNode<br>
</font></span><br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br></blockquote></div><br></div></div>