Hi Andreas,

You have to subclass QgsEditorWidgetWrapper and reimplement setEnabled
method (in which you can keep the widget always enabled).
Maybe have a look at QgsTextEditWrapper which keeps the line edit enabled
but read only.

Denis

Le jeu. 13 juil. 2017 à 13:42, Anders Vittrup <[email protected]> a écrit :

> Hi,
>
> I'm creating a plugin which creates a edit widget (or just a widget ? )
> where i have a combobox and a few buttons.
>
> Is it possible to force this widget to be enabled outside edit mode of the
> layer ?
> I have tried setEnabled on widget, parent, qgseditorwidgetwrapper and so
> on.
>
> The widget only gets enabled when i edit mode. But i still want it to be
> enabled when not in edit mode. I will select an item from the combobox and
> then click on a button in the widget.
>
> Is is this not possible or should i use another widgetwrapper than
> qgseditorwidgetwrapper?
>
> Best regards
> Anders
> _______________________________________________
> QGIS-Developer mailing list
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to