QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Static Public Member Functions | List of all members
QgsMemoryProviderUtils Class Reference

Utility functions for use with the memory vector data provider. More...

#include <qgsmemoryproviderutils.h>

Static Public Member Functions

static QgsVectorLayercreateMemoryLayer (const QString &name, const QgsFields &fields, Qgis::WkbType geometryType=Qgis::WkbType::NoGeometry, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem(), bool loadDefaultStyle=true) SIP_FACTORY
 Creates a new memory layer using the specified parameters. More...
 

Detailed Description

Utility functions for use with the memory vector data provider.

Since
QGIS 3.0

Definition at line 36 of file qgsmemoryproviderutils.h.

Member Function Documentation

◆ createMemoryLayer()

QgsVectorLayer * QgsMemoryProviderUtils::createMemoryLayer ( const QString &  name,
const QgsFields fields,
Qgis::WkbType  geometryType = Qgis::WkbType::NoGeometry,
const QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem(),
bool  loadDefaultStyle = true 
)
static

Creates a new memory layer using the specified parameters.

The caller takes responsibility for deleting the newly created layer.

Parameters
namelayer name
fieldsfields for layer
geometryTypeoptional layer geometry type
crsoptional layer CRS for layers with geometry
loadDefaultStyleoptional load default style toggle

Definition at line 70 of file qgsmemoryproviderutils.cpp.


The documentation for this class was generated from the following files: