Skip to content
Permalink
Browse files

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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
qgis-bot and github-actions committed Jul 7, 2020
1 parent f21bbc7 commit 04d51ec8bdb058bbfae6c153d4f82930fe3d18dc
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.

@@ -98,9 +98,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 04d51ec

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