summaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/qtcore_conversions.h
diff options
context:
space:
mode:
Diffstat (limited to 'PySide/QtCore/qtcore_conversions.h')
-rw-r--r--PySide/QtCore/qtcore_conversions.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/PySide/QtCore/qtcore_conversions.h b/PySide/QtCore/qtcore_conversions.h
new file mode 100644
index 0000000..076eb62
--- /dev/null
+++ b/PySide/QtCore/qtcore_conversions.h
@@ -0,0 +1,13 @@
+
+template <>
+struct Converter<QBool>
+{
+ static PyObject* toPython(ValueHolder<QBool> holder)
+ {
+ return PyBool_FromLong((bool)holder.value);
+ }
+ static QBool toCpp(PyObject* pyobj)
+ {
+ return QBool(pyobj == Py_True);
+ }
+};