[PyQt] global variable in a SIP-generated module
Phil Thompson
phil at riverbankcomputing.com
Mon Feb 23 11:56:05 GMT 2015
On 15/02/2015 12:58 pm, Wilbert Berendsen wrote:
> Hi,
>
> I have this small SIP file (included in a larger module).
>
> QList<int> version_list;
> PyObject *version;
>
> %ModuleCode
> QList<int> version_list = QList<int>() << 1 << 2 << 3;
> PyObject *version = Py_BuildValue("iii", 1, 2, 3);
> %End
>
>
> 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?
A bug - should be fixed (but not heavily tested) in current hg and
tonight's snapshot.
Thanks,
Phil
More information about the PyQt
mailing list