Menu

PythonQt: good *universal* Qwt wrapping tool?

2013-03-31
2013-04-06
  • V. Armando Sole

    V. Armando Sole - 2013-03-31

    Hello,

    I face the problem that I would like to use Qwt from Python *without* having to choose between PyQt or PySide.

    Cython would allow a relatively easy wrapping of the C++ code but, at the very minimum, it would face the problem of having to handle signals and slots.

    Would it be possible to use PythonQt just for that purpose while using PyQt or PySide for all the rest?

    Thanks for any attention provided to this perhaps off-topic post.

     
  • Florian Link

    Florian Link - 2013-03-31

    Although off-topic, still an interesting question.

    The problem is the missing interoperabilty… While you can use PythonQt to wrap/access Qwt, the wrapped Qwt (PythonQt wrapper) objects will not work together with the PySide/PyQt wrappers and since you surely want to mix the wrapped classes in Python (e.g. connect a signal from a Qwt class to a Qt GUI class etc.), you will end up with two worlds that do not connect well.

    Of course you could make PythonQt "PySide/PyQt" aware by supporting their wrappers and converting them on the fly to PythonQt. The other direction is more difficult because PySide/PyQt do not do the conversion on the fly, thus you would have to change the wrapper generators for PySide/PyQt to handle PythonQt wrappers (difficult task, I guess). And this would still leave you with lots of open question, like how to handle ownership of wrapped objects that are visible to PythonQt AND PySide etc.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.