Bug report #21034

QgsAction "enabledOnlyWhenEditable" not available in Python

Added by Benjamin Jakimow almost 6 years ago. Updated over 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Python bindings / sipify
Affected QGIS version:3.4.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28853

Description

Problem

The QgsAction keyword enabledOnlyWhenEditable is unavailable Python, although
the keyword is documented in both, the C++ (https://qgis.org/api/classQgsAction.html) and Python documentation (https://qgis.org/pyqgis/master/core/QgsAction.html).

the C++ and Python documentation describe it

Example

from qgis.core import QgsAction
QgsAction(QgsAction.GenericPython, 'dummy', 'print("dummy")', 'dummy', True, notificationMessage='dummy')

# fails
QgsAction(QgsAction.GenericPython, 'dummy', 'print("dummy")', 'dummy', True, notificationMessage='dummy', enabledOnlyWhenEditable=False)

Systems

Windows 10 Education, 64-Bit
macOS 10.13.6

QGIS version 3.4.3-Madeira
QGIS code revision 2f64a3c4e7

History

#1 Updated by Jürgen Fischer over 5 years ago

  • Easy fix? set to No
  • Regression? set to No
  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to 3.4.3
  • Category changed from Any to Python bindings / sipify
  • Project changed from QGIS Redmine (QGIS bug tracker) to QGIS Application

Also available in: Atom PDF