<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
If you install QGIS to custom path, you should set some environment
variables before calling pyuic4<br>
<br>
exemple:<br>
<br>
export QGIS_PREFIX_PATH=~/apps/qgis-master<br>
export LD_LIBRARY_PATH=$QGIS_PREFIX_PATH/lib<br>
export PYTHONPATH=$QGIS_PREFIX_PATH/share/qgis/python/:$PYTHONPATH<br>
<br>
Personnally, I've added one line in<br>
/usr/lib/python2.7/dist-packages/PyQt4/uic/widget-plugins/qgis_customwidgets.py<br>
<br>
pluginType = MODULE<br>
def moduleInformation():<br>
try:<br>
import qgis.gui<br>
return "qgis.gui", dir(qgis.gui)<br>
except ImportError:<br>
<b>print "impossible to import qgis.gui"</b><br>
return "", []<br>
<br>
to detect import error<br>
<br>
Arnaud<br>
<br>
<br>
<div class="moz-cite-prefix">Le 25/11/2014 09:35, Denis Rouzaud a
écrit :<br>
</div>
<blockquote cite="mid:54743F44.4030901@gmail.com" type="cite">Hi
Stefan,
<br>
<br>
To properly compile the UI file using pyuic4, you need to have the
uic widget plugin installed.
<br>
<br>
This is the file qgis_customwidgets.py that should be located in
/usr/lib/python2.7/dist-packages/PyQt4/uic/widget-plugins/
<br>
<br>
This file can be either installed by the package
python-qgis-common or using -WITH_CUSTOM_WIDGETS=TRUE if you
compile your own QGIS (I suppose this requires a make install).
<br>
<br>
Let me know if this helps.
<br>
<br>
Best wishes,
<br>
<br>
Denis
<br>
<br>
On 14.11.2014 16:13, Ziegler Stefan wrote:
<br>
<blockquote type="cite">Hi
<br>
<br>
I sucessfully used QGIS custom widgets (eg.
qgscollapsiblegroupbox) in qt designer in and then with python
plugins with "uic.loadUiType()". Using the "traditional" pyuic
approach I get an missing module error when starting QGIS:
<br>
<br>
ImportError: No module named qgscollapsiblegroupbox
<br>
<br>
I'm on Ubuntu 14.04 with an own compiled QGIS master. Do I have
to put "libqgis_customwidgets.so.2.7.0" somewhere specific? Or
is there anything else I have to do?
<br>
<br>
Regards
<br>
Stefan
<br>
<br>
Freundliche Grüsse
<br>
Stefan Ziegler
<br>
Kantonsgeometer
<br>
<br>
Amt für Geoinformation
<br>
Amtliche Vermessung
<br>
Rötistrasse 4
<br>
4500 Solothurn
<br>
<br>
Telefon +41 32 627 75 96
<br>
Telefax +41 32 627 75 98
<br>
<a class="moz-txt-link-abbreviated" href="mailto:stefan.ziegler@bd.so.ch">stefan.ziegler@bd.so.ch</a>
<br>
<a class="moz-txt-link-freetext" href="http://www.so.ch">http://www.so.ch</a>
<br>
<br>
<br>
_______________________________________________
<br>
Qgis-developer mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
<br>
</blockquote>
<br>
_______________________________________________
<br>
Qgis-developer mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Arnaud Morvan
Ingénieur logiciel
Tél: +33 (0)4 79 26 57 95
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
<a class="moz-txt-link-freetext" href="http://www.camptocamp.com">http://www.camptocamp.com</a></pre>
</body>
</html>