Table Manager problem (QObject.setProperty invalid type)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Table Manager problem (QObject.setProperty invalid type)

Ivan Mincik
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.

Ivan
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Table Manager problem (QObject.setProperty invalid type)

Giuseppe Sucameli
Hi Ivan,

On Sun, Sep 12, 2010 at 11:26 PM, Ivan Mincik <[hidden email]> 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
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Giuseppe Sucameli

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Table Manager problem (QObject.setProperty invalid type)

Borys Jurgiel-2
Thanks! I've fixed it as Guiuseppe proposed, I hope it's ok now.

Dnia niedziela 12 września 2010 o 23:56:32 Giuseppe Sucameli napisał(a):

> 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)
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer