[PyQt] global variable in a SIP-generated module

Wilbert Berendsen wbsoft at xs4all.nl
Sun Feb 15 12:58:35 GMT 2015


I have this small SIP file (included in a larger module).

QList<int> version_list;
PyObject *version;

QList<int> version_list = QList<int>() << 1 << 2 << 3;
PyObject *version = Py_BuildValue("iii", 1, 2, 3);

The `version_list` attribute is visible in the generated module (and
returns [1, 2, 3]), but the `version` is not. How can I make that one
visible too?

Thanks for any help.

Wilbert Berendsen

More information about the PyQt mailing list