Re: [Maya-Python] Re: adding text to statusline

2016-10-13 Thread Michał Frątczak
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 is the actively > running instance of a QApplication; you could alternatively call > QtWidgets.Q

Re: [Maya-Python] Re: adding text to statusline

2016-10-12 Thread Marcus Ottosson
Ah, that’s interesting. qApp is the actively running instance of a QApplication; you could alternatively call QtWidgets.QApplication.instance() . Maya is bound to have just one, but it seems that

Re: [Maya-Python] Re: adding text to statusline

2016-10-12 Thread Michał Frątczak
Thanks Marcus! With your help I was able to update code to working copy. There's one piece of it making trouble however: [code] QtWidgets.qApp.topLevelWidgets() [/code] Sometimes qApp is 'None' and I couldn't find a reproducible scenario for this. If my script is pasted to script editor it works

Re: [Maya-Python] Re: adding text to statusline

2016-10-12 Thread Marcus Ottosson
I’ve had a look at this just now, and it looks like they’ve gone from using a QToolBox to simply appending arbitrary widgets to a QLayout. I don’t blame them, think it should probably have been made that way from the start, but what it means for us is that there is no adapting this script to work.