[PyQt] QMetaEnum from PyQt?

J Barchan jnbarchan at gmail.com
Thu Nov 23 16:39:55 GMT 2017


I would like to convert an enum to its string (in this case, for a
QProcess.ProcessError).  C++ code would be as per e.g.
https://stackoverflow.com/a/34282031/489865, or possibly one of the other
solutions there or elsewhere.  Note that this is only for Qt5, but I do
have to support 5.5 onward, which rules out one of the answers there.

Is this possible from PyQt/Python, and if so would you be kind enough to
show Python/PyQt code, as it's a bit hard to figure with those C++ type
statements etc.?

TIA.

-- 
Kindest,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20171123/485c872b/attachment.html>


More information about the PyQt mailing list