PyQt and Maya sharing scripts question

So please help me to understand something with the Maya PyQt integration. So to use PyQt you have to install it along side Maya. If I wanted to share a python script that uses pyQt with “random Internet friend #1” they also have to have PyQt installed to even run the script? Is that correct, that Maya by itself won’t understand it?

If so then options for making the most compatible python script would be using maya’s internal GUI system or if aiming for strictly for Maya 2014 Pyside could be used since its integrated?

Thanks for any input

you are correct on all counts. if you want to share scripts with the widest audience, using Maya’s internal GUI system is the best way to go.
if you are sharing on 2014, then use PySide.

Prior to PySide, PyQt worked well if you are in a team environment, where everyone has the same setup. Outside of that, PyQt is messy, especially because of it’s license.

Just make sure you support both PyQt and Pyside in your app. That way you are covered.

++ to using Maya GUI wherever possible - best for backward compatibility and distribution, even though it’s not as pretty or flexible.

Unfortunately, these days you are not considered a serious tool developer if all you know is mel and Maya’s UI commands.

Thanks for the clarifications! I’ll keep them in mind on future devs

[QUOTE=cgjedi;23644]Just make sure you support both PyQt and Pyside in your app. That way you are covered.[/QUOTE]

Is supporting both particularly difficult? Or as simple, say, as importing Qt.Core from PySide rather than PyQt?

setting up support for both packages happens mainly in the import stages. It’s more than just switching out one import statement. There are a few good tutorials on it if you search.

[QUOTE=cgjedi;23669]setting up support for both packages happens mainly in the import stages. It’s more than just switching out one import statement. There are a few good tutorials on it if you search.[/QUOTE]

Cheers, I’ll do that.

Maya 2014 comes with PySide so you don’t really need to install pyqt on someone’s machine as long as you are only using Qt in Maya. Though if you are sharing over the internet it’s best to support older versions of Maya, since everyone isn’t using 2014 yet. You can go as far as to try and load pyqt or pyside and if those fail you can just load up a Maya gui.

ya a lot of people arent bothering to move to 2014 as well, since it does seem pretty buggy, but it is easy enough to just test for the pyside and pyqt modauls with a try and except statement, and load your maya gui if it fails.