Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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[bot] committed Jul 7, 2020
1 parent f21bbc7 commit 04d51ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions python/core/auto_generated/qgsvectorlayer.sip.in
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsvectorlayer.h
Expand Up @@ -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.
Expand Down

0 comments on commit 04d51ec

Please sign in to comment.