[Qgis-developer] Table Manager problem (QObject.setProperty invalid type)

Giuseppe Sucameli brush.tyler at gmail.com
Sun Sep 12 17:56:32 EDT 2010


Hi Ivan,

On Sun, Sep 12, 2010 at 11:26 PM, Ivan Mincik <ivan.mincik at gmail.com> wrote:

> Hi,
> when trying to run QGIS Table Manager on Debian Lenny (Qt 4.4.3) it is
> crashing with following error:
>
> Traceback (most recent call last):
>  File "/home/ivo/.qgis/python/plugins/tablemanager/tableManager_plugin.py",
> line 62, in run
>    dialoga = tableManager_gui.TableManager(self.iface)
>  File "/home/ivo/.qgis/python/plugins/tablemanager/tableManager_gui.py",
> line 146, in __init__
>    self.setupUi(self)
>  File "/home/ivo/.qgis/python/plugins/tablemanager/tableManagerUi.py",
> line 31, in setupUi
>    self.progressBar.setProperty("value", 0)
> TypeError: argument 2 of QObject.setProperty() has an invalid type
>
> Changing line 31 to 'self.progressBar.setProperty("value",
> QtCore.QVariant(0))' is fixing the problem.
> File  'tableManagerUi.py' is generated, so I have no idea what to
> change in 'ui' file to get it working correctly with older Qt
> versions.
>
AFAIK it's a pyuic4 bug.

In GdalTools I fixed this issue by resetting the "value" property of
progressBars and spinBoxes to the default value in the .ui files (you
can use QtDesigner or remove the following lines from your .ui file)

<property name="value">
   <number>0</number>
</property>

Then you'll set the default value by code (i.e. in the constructor)

Cheers.


> Ivan
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100912/c966eb13/attachment.html


More information about the Qgis-developer mailing list