Thanks Fredrik,

that sounds a little scary but I'm glad you're onto it :)
When I get time I should give it a go with my existing code.
Any word from The Foundry about their plans re QT4/5 PySide/PySide2?
Any plan on vfx platfrom for this?

Thanks for your work!!

frank

On 07/26/2016 09:45 PM, Fredrik Averpil wrote:

Yeah this is one %!&#! of a headache.

I’d like to just mention Qt.py <https://github.com/mottosso/Qt.py>, which is an open source project Marcus Ottosson and myself started because of this mess as well as PySide will disappear alltogether the day Nuke stops using Qt4 and begins using Qt5.

When that happens, PySide2 will most likely get bundled with Nuke and all previous PySide/PyQt4 scripts will stop working.

So, our solution is you don’t import PySide at all. Instead you import our shim instead of a specific Python binding. This simple example code works in Python 2 & 3 with either PySide, PyQt4, PySide2 or PyQt5:

|import sys from Qt import QtWidgets app = QtWidgets.QApplication(sys.argv) button = QtWidgets.QPushButton("Hello World") button.show() app.exec_() |

To help get you started, here are two blog posts which outline how to use Qt.py:

 *

    Dealing with Maya 2017 and PySide2
    
<https://fredrikaverpil.github.io/2016/07/25/dealing-with-maya-2017-and-pyside2/>

 *

    Developing with Qt.py
    <https://fredrikaverpil.github.io/2016/07/25/developing-with-qt-py/>

We’d love to hear what you think about this! :)

Regards,
Fredrik

​


_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to