Skip to content
Permalink
Browse files

Show python code sample in PyQGIS doc, take 2 (#37642)

  • Loading branch information
3nids committed Jul 7, 2020
1 parent 5f6dab0 commit d14b34944753033d127465fe82de40cc9aeed04f
Showing with 6 additions and 6 deletions.
  1. +3 −3 python/core/auto_generated/qgsvectorlayer.sip.in
  2. +3 −3 src/core/qgsvectorlayer.h
@@ -34,10 +34,10 @@ manages editing transactions.

Sample usage of the QgsVectorLayer class:

.. code-block::
.. code-block:: python

QString uri = "point?crs=epsg:4326&field=id:integer";
QgsVectorLayer *scratchLayer = new QgsVectorLayer(uri, "Scratch point layer", "memory");
uri = "point?crs=epsg:4326&field=id:integer"
scratchLayer = QgsVectorLayer(uri, "Scratch point layer", "memory")

The main data providers supported by QGIS are listed below.

@@ -101,9 +101,9 @@ typedef QSet<int> QgsAttributeIds;
*
* Sample usage of the QgsVectorLayer class:
*
* \code
* QString uri = "point?crs=epsg:4326&field=id:integer";
* QgsVectorLayer *scratchLayer = new QgsVectorLayer(uri, "Scratch point layer", "memory");
* \code{.py}
* uri = "point?crs=epsg:4326&field=id:integer"
* scratchLayer = QgsVectorLayer(uri, "Scratch point layer", "memory")
* \endcode
*
* The main data providers supported by QGIS are listed below.

0 comments on commit d14b349

Please sign in to comment.
You can’t perform that action at this time.