Re: [QGIS-Developer] can't load plugins with QGIS custom widgets in windows

2017-10-02 Thread lbartoletti

Hi Enrico,

Maybe add in your .ui files this snippet after the custom widgets 
section:


 
  qgis.gui
 

Regards

Loïc

On 2017-09-29 09:43, Enrico Ferreguti wrote:

Hi Loïc,
I have no luck with your fix. I'm getting the same exception.

The uic module doesn't recognize the property
QgsMapLayerProxyModel::RasterLayer of the custom widget as valid. I
tried to remove the entire property section from .ui file and set it
programmatically during the dialog __init__ with
self.RasterLayer.setFilters(QgsMapLayerProxyModel.RasterLayer)

after setupUi but the widget does not load available layers...

Thanks anyway.

Enrico Ferreguti

2017-09-28 22:12 GMT+02:00 L.Bartoletti :


Hi,

I have found the same problem on FreeBSD if custom widgets are not
installed.

My solution at least on FreeBSD and Windows (osgeo4w) use your .ui
(it's only a XML), search this:


YOUR CUSTOM WIDGET
YOUR CUSTOM WIDGET
YOUR CUSTOM WIDGET.h


and change the line containing a C++ header:

YOUR CUSTOM WIDGET.h

by :

qgis.gui

Regards.

Loïc

On 28.09.2017 16:54, Enrico Ferreguti wrote:

I'm getting the following exception:

AttributeError: unknown enum QgsMapLayerProxyModel::RasterLayer

loading a plugin with QGIS custom QT designer widget in windows
standalone QGIS 2.14 ltr and 2.18.

The exception doesn't affect linux and osgeo4win installations.

I found that this was a 2015 reported issue:
https://issues.qgis.org/issues/13428 [2]

and I solve it as suggested in


https://lists.osgeo.org/pipermail/qgis-developer/2015-September/039196.html

[3] simply copying a file in the right place.

The fix is apparently easy and considering that Qt custom widgets
are widely used I can't figure why this old issue isn't yet solved.

Is it a qgis or an osgeo4win issue? Should I reopen a ticket?

Thanks. Enrico Ferreguti.

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[1]
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[1]


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer [1]
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[1]



Links:
--
[1] https://lists.osgeo.org/mailman/listinfo/qgis-developer
[2] https://issues.qgis.org/issues/13428
[3] 
https://lists.osgeo.org/pipermail/qgis-developer/2015-September/039196.html

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] can't load plugins with QGIS custom widgets in windows

2017-09-29 Thread Enrico Ferreguti
Hi Loïc,
I have no luck with your fix. I'm getting the same exception.
The uic module doesn't recognize the property
QgsMapLayerProxyModel::RasterLayer
of the custom widget as valid. I tried to remove the entire property
section from .ui file and set it programmatically during the dialog
__init__ with
self.RasterLayer.setFilters(QgsMapLayerProxyModel.RasterLayer)
after setupUi but the widget does not load available layers...

Thanks anyway.
Enrico Ferreguti

2017-09-28 22:12 GMT+02:00 L.Bartoletti :

> Hi,
>
> I have found the same problem on FreeBSD if custom widgets are not
> installed.
>
> My solution at least on FreeBSD and Windows (osgeo4w) use your .ui (it's
> only a XML), search this:
>
>   
>YOUR CUSTOM WIDGET
>YOUR CUSTOM WIDGET
>YOUR CUSTOM WIDGET.h
>   
>
> and change the line containing a C++ header:
>
> YOUR CUSTOM WIDGET.h
>
> by :
>
> qgis.gui
>
>
> Regards.
>
> Loïc
>
> On 28.09.2017 16:54, Enrico Ferreguti wrote:
>
> I'm getting the following exception:
>
> AttributeError: unknown enum QgsMapLayerProxyModel::RasterLayer
>>
>
> loading a plugin with QGIS custom QT designer widget in windows standalone
> QGIS 2.14 ltr and 2.18.
>
> The exception doesn't affect linux and osgeo4win installations.
>
> I found that this was a 2015 reported issue: https://issues.qgis.org/
> issues/13428
> and I solve it as suggested in https://lists.osgeo.org/
> pipermail/qgis-developer/2015-September/039196.html simply copying a file
> in the right place.
>
> The fix is apparently easy and considering that Qt custom widgets are
> widely used I can't figure why this old issue isn't yet solved.
>
> Is it a qgis or an osgeo4win issue? Should I reopen a ticket?
>
> Thanks. Enrico Ferreguti.
>
>
>
>
>
> ___
> QGIS-Developer mailing listqgis-develo...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] can't load plugins with QGIS custom widgets in windows

2017-09-28 Thread L.Bartoletti

Hi,

I have found the same problem on FreeBSD if custom widgets are not 
installed.


My solution at least on FreeBSD and Windows (osgeo4w) use your .ui (it's 
only a XML), search this:


  
   YOUR CUSTOM WIDGET
   YOUR CUSTOM WIDGET
   YOUR CUSTOM WIDGET.h
  

and change the line containing a C++ header:

YOUR CUSTOM WIDGET.h

by :

qgis.gui


Regards.

Loïc


On 28.09.2017 16:54, Enrico Ferreguti wrote:

I'm getting the following exception:

AttributeError: unknown enum QgsMapLayerProxyModel::RasterLayer


loading a plugin with QGIS custom QT designer widget in windows 
standalone QGIS 2.14 ltr and 2.18.


The exception doesn't affect linux and osgeo4win installations.

I found that this was a 2015 reported issue: 
https://issues.qgis.org/issues/13428
and I solve it as suggested in 
https://lists.osgeo.org/pipermail/qgis-developer/2015-September/039196.html 
simply copying a file in the right place.


The fix is apparently easy and considering that Qt custom widgets are 
widely used I can't figure why this old issue isn't yet solved.


Is it a qgis or an osgeo4win issue? Should I reopen a ticket?

Thanks. Enrico Ferreguti.





___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] can't load plugins with QGIS custom widgets in windows

2017-09-28 Thread Enrico Ferreguti
I'm getting the following exception:

AttributeError: unknown enum QgsMapLayerProxyModel::RasterLayer
>

loading a plugin with QGIS custom QT designer widget in windows standalone
QGIS 2.14 ltr and 2.18.

The exception doesn't affect linux and osgeo4win installations.

I found that this was a 2015 reported issue:
https://issues.qgis.org/issues/13428
and I solve it as suggested in
https://lists.osgeo.org/pipermail/qgis-developer/2015-September/039196.html
simply copying a file in the right place.

The fix is apparently easy and considering that Qt custom widgets are
widely used I can't figure why this old issue isn't yet solved.

Is it a qgis or an osgeo4win issue? Should I reopen a ticket?

Thanks. Enrico Ferreguti.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer