[QGIS-Developer] QGIS edit widget force enable without edit mode

Denis Rouzaud denis.rouzaud at gmail.com
Thu Jul 13 12:02:04 PDT 2017


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 <anvit2a at gmail.com> 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
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170713/3b252f6c/attachment.html>


More information about the QGIS-Developer mailing list