Class: QgsLabelingEngineRuleAvoidLabelOverlapWithFeature¶
A labeling engine rule which prevents labels being placed overlapping features from a different layer.
Added in version 3.40.
Class Hierarchy¶
Base classes¶
Abstract base class for labeling engine rules.  | 
Methods
Returns the layer providing the labels.  | 
|
Sets the layer providing the labels.  | 
|
Sets the layer providing the features which labels must not overlap.  | 
|
Returns the layer providing the features which labels must not overlap.  | 
- class qgis.core.QgsLabelingEngineRuleAvoidLabelOverlapWithFeature[source]¶
 Bases:
QgsAbstractLabelingEngineRule- labeledLayer(self) QgsMapLayer | None[source]¶
 Returns the layer providing the labels.
See also
- Return type:
 Optional[QgsMapLayer]
- setLabeledLayer(self, layer: QgsMapLayer | None)[source]¶
 Sets the
layerproviding the labels.See also
- Parameters:
 layer (Optional[QgsMapLayer])
- setTargetLayer(self, layer: QgsVectorLayer | None)[source]¶
 Sets the
layerproviding the features which labels must not overlap.See also
- Parameters:
 layer (Optional[QgsVectorLayer])
- targetLayer(self) QgsVectorLayer | None[source]¶
 Returns the layer providing the features which labels must not overlap.
See also
- Return type:
 Optional[QgsVectorLayer]