Skip to content

Instantly share code, notes, and snippets.

@chiiph
Created May 29, 2013 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiiph/5673123 to your computer and use it in GitHub Desktop.
Save chiiph/5673123 to your computer and use it in GitHub Desktop.
PyObject* signalInstanceEmit(PyObject* self, PyObject* args)
{
PySideSignalInstance* source = reinterpret_cast(self);
Shiboken::AutoDecRef pyArgs(PyList_New(0));
Shiboken::AutoDecRef sourceSignature(PySide::Signal::buildQtCompatible(source->d->signature));
PyList_Append(pyArgs, sourceSignature);
for (Py_ssize_t i = 0, max = PyTuple_Size(args); i d->source, "emit"));
Shiboken::AutoDecRef tupleArgs(PyList_AsTuple(pyArgs));
return PyObject_CallObject(pyMethod, tupleArgs);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment