Developer Documentation
pybind11::detail::type_caster< QString > Struct Template Reference

Public Member Functions

 PYBIND11_TYPE_CASTER (QString, _("str"))
 
bool load (handle src, bool)
 

Static Public Member Functions

static handle cast (QString src, return_value_policy, handle)
 

Detailed Description

template<>
struct pybind11::detail::type_caster< QString >

Definition at line 50 of file PythonTypeConversions.hh.

Member Function Documentation

◆ cast()

static handle pybind11::detail::type_caster< QString >::cast ( QString  src,
return_value_policy  ,
handle   
)
inlinestatic

Conversion part 2 (C++ -> Python): convert an QString instance into a Python object. The second and third arguments are used to indicate the return value policy and parent object (for return_value_policy::reference_internal) and are generally ignored by implicit casters.

Definition at line 93 of file PythonTypeConversions.hh.

◆ load()

bool pybind11::detail::type_caster< QString >::load ( handle  src,
bool   
)
inline

Conversion part 1 (Python->C++): convert a PyObject into a QString instance or return false upon failure. The second argument indicates whether implicit conversions should be applied.

Definition at line 64 of file PythonTypeConversions.hh.

◆ PYBIND11_TYPE_CASTER()

pybind11::detail::type_caster< QString >::PYBIND11_TYPE_CASTER ( QString  ,
_("str")   
)

This macro establishes the name 'str' in function signatures and declares a local variable 'value' of type QVariant


The documentation for this struct was generated from the following file: