[PyQt] Embedding Python in an exsting Qt application with PyQt?

oliver oliver.schoenborn at gmail.com
Sun Sep 10 20:50:06 BST 2017

You don't necessarily need pyqt for this, it depends on your specifics. You
would embed the interpreter the usual way, and would have a "terminal"
window (QTextEdit or such) that has a REPL to interface with the embedded
interpreter. You would expose *emergent* C++ classes to the Python
interpreter via SWIG or sip. You would only need PyQt if you actually
wanted to expose *Qt* classes in this scripting window, so the user can
create custom classes deriving from QWidget etc, but if you just want to
allow the user to instantiate pre-defined *emergent* GUI classes you should
not need PyQt. If you do need PyQt, then it is probably wise to use sip
(instead of SWIG) to expose *emergent* C++ classes. I would guess you will
have to use compilation and linking flags/settings compatible with those of
the sip you installed, or if that is not possible, you will have to build
sip, Qt, and emergent from source.

Sounds like a fun project, good luck!

On Sun, 10 Sep 2017 at 14:16 Brian Mingus <reflection at gmail.com> wrote:

> I am looking to extend the Qt5 application *emergent* (
> https://grey.colorado.edu/emergent) with a Python interpreter. Would it
> be possible to use PyQt for this, and to also use that interpreter to
> program emergent's Qt UI?
> Thanks,
> Brian
> http://linkedin.com/in/brianmingus
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

My StackOverflow contributions
My CodeProject articles
My Github projects
My SourceForget.net projects
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170910/06c4eb5f/attachment.html>

More information about the PyQt mailing list