Class: QgsEmptyLayerCreationResult

Encapsulates the details of a newly created empty layer.

Added in version 4.2.

List of all members, including inherited members

Methods

createdAttributeIndexMap

Returns a map of the original requested field index to the actual created field index.

createdLayerUri

Returns the created layer URI.

errorMessage

Returns any user-friendly error messages obtained if the creation fails.

result

Returns the result code of the layer creation.

class qgis.core.QgsEmptyLayerCreationResult[source]

Bases: object

createdAttributeIndexMap(self) Any

Returns a map of the original requested field index to the actual created field index.

In some cases the provider may re-arrange fields from their original requested order. It’s not always possible to directly determine this mapping from the output layer alone, as the provider may have changed requested fields as part of the layer creation process (eg when the provider has had to automatically launder them).

Return type:

Any

createdLayerUri(self) str[source]

Returns the created layer URI.

This will be set to the actual URI of the layer created.

In some circumstances this may differ from the original requested uri, eg when the provider has had to automatically launder a layer name.

Return type:

str

errorMessage(self) str[source]

Returns any user-friendly error messages obtained if the creation fails.

Return type:

str

result(self) Qgis.VectorExportResult[source]

Returns the result code of the layer creation.

Return type:

Qgis.VectorExportResult