Is it giving you an error? You do have a bug in your Ball.add(). It should
be
@Slot(int)
def add(self, arg1):
mc.polySphere(r=arg1)
On Tue, Jul 31, 2018, 4:57 AM Ruchit Bhatt <[email protected]>
wrote:
> How to run & display QQmlApplicationEngine in Maya using PySide2?
> Here is my code
>
> class Ball(QObject):
> def __init__(self):
> QObject.__init__(self)
>
> @Slot(int)
> def add(arg1):
> mc.polySphere(r=arg1)
>
>
> engine = QQmlApplicationEngine()
> ball = Ball()
> engine.rootContext().setContextProperty("ball", ball)
> engine.load(QUrl.fromLocalFile("E:/code/QML/sphere.qml"))
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/d1a58266-9ab4-4ce9-ad4e-463a8e850d5b%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/d1a58266-9ab4-4ce9-ad4e-463a8e850d5b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2c4VS5ZMYUb%2Bt6AFNmarpjBLWWhsOtir5GGVjMehj70Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.