[Qgis-developer] python code in form

Matthias Kuhn matthias at opengis.ch
Tue Jan 6 02:59:37 PST 2015


Hi Luca,

There was a /DEBUGMODE/ attribute introduced some time ago, that can be
set on the python form module. If it is set to True, the changes should
be reloaded automatically when you reopen the form.

Matthias

On 01/04/2015 10:39 PM, Luca Lanteri wrote:
> Hi,
>
> I'm using the init python function in order to add python code into my
> QGIS forms. This is a great function because I can add intelligence to
> my form without write a plugin, but I still have some problems:
> - I want to store qml and .ui file directly into Postgres so that when
> my users load a layer from postrgres they've my forms and styles,
> without pass to us a qgis project, but in this way I loose the python
> code. Is there a way to store also the python code in postgres or into
> qml?
> - when I change my python code, qgis can't auto reload it. I have to
> save the file with a different name and I have to change the name in
> the layer properties. Is there a way to force autoreload of the code,
> also only for debugging?
>
> I also thought to move my code in a plugin to bypass those problems
> but I think I've to rewrite all useful function that come with the
> forms properties, eg: the combo population. is It right or there's a
> way to include the QGIS forms add-on into a plugin?
>
> Sorry for my newbie's question and thanks in advance.
> Luca
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150106/d5d54072/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150106/d5d54072/attachment.pgp>


More information about the Qgis-developer mailing list