I want to access the name of a rule in the rule-based labeling of a layer in QGIS via Python.
Getting all the attributes works for me, also the preview text. But I didn't find the property to get the name of a rule. Here a short code example:
layer = iface.activeLayer()
labeling = layer.labeling()
for rule in labeling.subProviders():
print(labeling.settings(rule).Show)
print(labeling.settings(rule).Priority)