Skip to content

Commit

Permalink
Show python code sample in PyQGIS doc, take 2 (#37642)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jul 7, 2020
1 parent 5f6dab0 commit d14b349
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 @@ -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.
Expand Down

0 comments on commit d14b349

Please sign in to comment.