All is working great now, thanks Marcus

On Wednesday, October 12, 2016 at 5:41:36 PM UTC+2, Marcus Ottosson wrote:
>
> Ah, that’s interesting.
>
> qApp <https://doc.qt.io/qt-5/qapplication.html#qApp> is the actively 
> running instance of a QApplication; you could alternatively call 
> QtWidgets.QApplication.instance() 
> <https://doc.qt.io/qt-5/qcoreapplication.html#instance>. Maya is bound to 
> have just one, but it seems that, based on your description, userSetup.py 
> executes *before* Qt starts running (sometimes?).
>
> I would pass the entire thing, e.g. by wrapping it into a function, 
> through cmds.evalDeferred or Qt.QtCore.QTimer.singleShot, that should 
> give Qt enough time to catch up.
> ​
>

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/8ab1dc38-2297-4e38-b9cb-02062c376312%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to