5

I have written a plugin for QGIS that is importing some data. In this plugin, I can create a memory layer for the data like I have described here https://gis.stackexchange.com/a/349354/10123.

How can I create a primary key / feature id column on this table? In the QgsVectorDataProvider, I see I can use pkAttributeIndexes to list the fields making up the primary key, but how can I set it?

Matt
  • 16,843
  • 3
  • 21
  • 52
MortenSickel
  • 3,734
  • 1
  • 19
  • 40

0 Answers0