aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/doc/typesystem_specifying_types.rst
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/doc/typesystem_specifying_types.rst')
-rw-r--r--sources/shiboken2/doc/typesystem_specifying_types.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken2/doc/typesystem_specifying_types.rst b/sources/shiboken2/doc/typesystem_specifying_types.rst
index 221519541..3b40ef236 100644
--- a/sources/shiboken2/doc/typesystem_specifying_types.rst
+++ b/sources/shiboken2/doc/typesystem_specifying_types.rst
@@ -108,6 +108,7 @@ primitive-type
target-name="..."
default-constructor="..."
preferred-conversion="yes | no" />
+ view-on="..."
</typesystem>
The **name** attribute is the name of the primitive in C++, the optional,
@@ -139,6 +140,13 @@ primitive-type
used only for classes declared as primitive types and not for primitive C++
types, but that depends on the application using *ApiExtractor*.
+ The *optional* **view-on** attribute specifies that the type is a view
+ class like std::string_view or QStringView which has a constructor
+ accepting another type like std::string or QString. Since typically
+ no values can be assigned to view classes, no target-to-native conversion
+ can be generated for them. Instead, an instance of the viewed class should
+ be instantiated and passed to functions using the view class
+ for argument types.
.. _namespace: