I am trying to create a Meshlayer in memory and tried this simple test in QGIS 3.6:
from qgis.core import QgsProject,QgsMeshLayer
proj = QgsProject.instance()
uri="1.0, 2.0 \n2.0, 2.0 \n3.0, 2.0 \n2.0, 3.0 \n1.0, 3.0 \n---0, 1, 3, 4 \n1, 2, 3 \n"
outLayer = QgsMeshLayer( uri, 'test', "memory_mesh")
proj.addMapLayer(outLayer)
Apparently dataprovider has no attribute name and QGIS crashes.
Is there something that I am doing wrong? What shoulb be the format of URI
, a simple string?