[PyQt] Fwd: Re: Convert code from C++ to Python
oliver
oliver.schoenborn at gmail.com
Wed Jan 6 08:12:30 GMT 2016
Going from c++ to Python is usually straightforward:
- replace the includes by imports from PyQt5
- replace all -> and :: by dot
- replace all Foo* foo = new Foo(…) by foo = Foo(…)
- remove all &, *, voids and deletes
- convert custom signals to use pyqtSignal at class level
- convert connections to use new style pythonic syntax
- after all above done, run the app and see what exceptions get raised, and
fix iteratively, to handle any remaining discrepancies.
If you get stuck doing this, then post specifically about exception seen or
what does not work and post the code (I recommend posting on
stackoverflow.com).
Good luck,
Oliver
> On 2016-01-05 8:25 PM, "Pedro Paulo" <pedropaulobmjr at hotmail.com> wrote:
> >
> > Can someone convert this code (
http://www.davidwdrell.net/wordpress/?page_id=46) to python?
> > I can't and that's exactly what I need to my implementation. If someone
can help me with this, really thanks!
> >
> > _______________________________________________
> > PyQt mailing list PyQt at riverbankcomputing.com
> > https://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160106/81625b23/attachment.html>
More information about the PyQt
mailing list