Il 08/17/2015 01:35 PM, Matthias Kuhn scrisse:
From the stack trace it looks like it does not get a widgetwrapper back
from the factory.
Can you verify if the method in the factory is called before the crash
and returns a widget wrapper?

Sorry for answering your question after a long time. I do not own a Mac and it is a little bit difficult for me to debug on that os.

Meanwhile I found out that my plugin seems to be working only on my development pc (slackware 14.1). :-( I remember I tested it on a windows 7 pc with qgis 2.8.1 too but now it works no more on it so I'm not sure of anything. Anyway the plugin doesn't work on osgeo 9 mini live (qgis 2.8.3), windows 8.1 (qgis 12), windows 7 (qgis 2.8.1), osx (qgis 2.10.*).

I tried to debug it on the pc with osgeo 9.
I put some breaks on the code in the *_setup.py file.

class TreeWidgetWrapperFactory( QgsEditorWidgetFactory ):
         def __init__( self ):
                QgsEditorWidgetFactory.__init__( self, "MyTreeWidget" )
                                                                                
                
         def create( self, layer, fieldIdx, editor, parent ):
                return TreeWidgetWrapper( layer, fieldIdx, editor, parent )

__init__ runs when qgis starts.
create and the other methods of TreeWidgetWrapperFactory never run.

When I open the layer properties - Fields and click on Edit widget of my widget nothing happens in the debugger. The widget configuration window (Edit widget properties) opens but the only parameter field is missing. If I select (on the left) another type of field (check box, text edit...) their respective configuration parameters are displayed in the window. But if I select again my widget, the configuration parameters of the last selected widget stays on the window.

I don't know what else to do.

Thank you
        maxx



Matthias

On 08/17/2015 01:24 PM, emmexx wrote:
Il 08/17/2015 12:51 PM, Matthias Kuhn scrisse:
What exactly does this plugin involve?

You helped me create it last march! :-)

I have a field of comma-separated integers. The user should be able to
select one or more values from a tree-like list.
The plugin just shows the data in a tree view fashion and manages the
transition between field format and treewidget format.
I followed the "manual" and your suggestions, see the thread
"Customised attributes form".

     maxx
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user



_______________________________________________
Qgis-user mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to