aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/templates/gui_common.xml
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/PySide2/templates/gui_common.xml')
-rw-r--r--sources/pyside2/PySide2/templates/gui_common.xml17
1 files changed, 13 insertions, 4 deletions
diff --git a/sources/pyside2/PySide2/templates/gui_common.xml b/sources/pyside2/PySide2/templates/gui_common.xml
index a139a5fe9..fb8e66881 100644
--- a/sources/pyside2/PySide2/templates/gui_common.xml
+++ b/sources/pyside2/PySide2/templates/gui_common.xml
@@ -88,7 +88,7 @@
switch(%CPPSELF.spec()) {
case QColor::Rgb:
{
- qreal r, g, b, a;
+ float r, g, b, a;
%CPPSELF.getRgbF(&r, &g, &b, &a);
QString repr = QString::asprintf("PySide2.QtGui.QColor.fromRgbF(%.6f, %.6f, %.6f, %.6f)", r, g, b, a);
%PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
@@ -96,7 +96,7 @@
}
case QColor::Hsv:
{
- qreal h, s, v, a;
+ float h, s, v, a;
%CPPSELF.getHsvF(&h, &s, &v, &a);
QString repr = QString::asprintf("PySide2.QtGui.QColor.fromHsvF(%.6f, %.6f, %.6f, %.6f)", h, s, v, a);
%PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
@@ -104,7 +104,7 @@
}
case QColor::Cmyk:
{
- qreal c, m, y, k, a;
+ float c, m, y, k, a;
%CPPSELF.getCmykF(&c, &m, &y, &k, &a);
QString repr = QString::asprintf("PySide2.QtGui.QColor.fromCmykF(%.6f, %.6f, %.6f, %.6f, %.6f)", c, m, y, k, a);
%PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
@@ -112,7 +112,7 @@
}
case QColor::Hsl:
{
- qreal h, s, l, a;
+ float h, s, l, a;
%CPPSELF.getHslF(&h, &s, &l, &a);
QString repr = QString::asprintf("PySide2.QtGui.QColor.fromHslF(%.6f, %.6f, %.6f, %.6f)", h, s, l, a);
%PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
@@ -125,6 +125,15 @@
}
</template>
+ <template name="qkeysequence_repr">
+ QString result;
+ QDebug debug(&amp;result);
+ debug.noquote();
+ debug.nospace();
+ debug &lt;&lt; (*%CPPSELF);
+ %PYARG_0 = Shiboken::String::fromCString(result.toUtf8().constData());
+ </template>
+
<template name="validator_conversionrule">
QValidator::State %out;