本文整理汇总了C++中PythonQtSlotFunction_Check函数的典型用法代码示例。如果您正苦于以下问题:C++ PythonQtSlotFunction_Check函数的具体用法?C++ PythonQtSlotFunction_Check怎么用?C++ PythonQtSlotFunction_Check使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PythonQtSlotFunction_Check函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PyObject_GetAttrString
QSize PythonQtShell_QSvgWidget::minimumSizeHint() const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getMinimumSizeHint");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"QSize"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
QSize returnValue;
void* args[1] = {NULL};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) {
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
if (args[0]!=&returnValue) {
if (args[0]==NULL) {
PythonQt::priv()->handleVirtualOverloadReturnError("getMinimumSizeHint", methodInfo, result);
} else {
returnValue = *((QSize*)args[0]);
}
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QSvgWidget::minimumSizeHint();
}
示例2: PyObject_GetAttrString
QString PythonQtShell_QTranslator::translate(const char* context, const char* sourceText, const char* disambiguation) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "translate");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"QString" , "const char*" , "const char*" , "const char*"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList);
QString returnValue;
void* args[4] = {NULL, (void*)&context, (void*)&sourceText, (void*)&disambiguation};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) {
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
if (args[0]!=&returnValue) {
if (args[0]==NULL) {
PythonQt::priv()->handleVirtualOverloadReturnError("translate", methodInfo, result);
} else {
returnValue = *((QString*)args[0]);
}
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QTranslator::translate(context, sourceText, disambiguation);
}
示例3: PyObject_GetAttrString
QLayout* PythonQtShell_QUiLoader::createLayout(const QString& className, QObject* parent, const QString& name)
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "createLayout");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const char* argumentList[] ={"QLayout*" , "const QString&" , "QObject*" , "const QString&"};
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList);
QLayout* returnValue;
void* args[4] = {NULL, (void*)&className, (void*)&parent, (void*)&name};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) {
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
if (args[0]!=&returnValue) {
if (args[0]==NULL) {
PythonQt::priv()->handleVirtualOverloadReturnError("createLayout", methodInfo, result);
} else {
returnValue = *((QLayout**)args[0]);
}
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QUiLoader::createLayout(className, parent, name);
}
示例4: PythonQtSlotFunction_GetSelf
PyObject *
PythonQtSlotFunction_GetSelf(PyObject *op)
{
if (!PythonQtSlotFunction_Check(op)) {
PyErr_Format(PyExc_SystemError, "%s:%d: bad argument to internal function", __FILE__, __LINE__);
return NULL;
}
return ((PythonQtSlotFunctionObject *)op) -> m_self;
}