It was something I came by over at stackoverflow… works great for me in
both Maya and Nuke (PySide), returns the active Maya window.
http://qt-project.org/doc/qt-4.8/qapplication.html#activeWindow

Then it looks like you just stumbled upon a holy grail. :) Fetching this
handle has always been a PITA and this looks simple and logical. Will be
trying this out next. Thanks!

I may be wrong here but I also think exec_() available for QtGui.QWidget.

You can see everything it supports here:
http://qt-project.org/doc/qt-4.8/qwidget-members.html

Best,
Marcus
​

On 6 October 2014 14:01, Fredrik Averpil <[email protected]> wrote:

> The difference here is that exec_(), as mentioned by Justin, will block
>> until the window closes. Can be useful if you expect results from a window,
>> such as in a save-dialog returning a path. However I think exec_ is only
>> available on QDialog subclasses.
>>
> Ah yes. In my particular case, I don’t need that - so I was very happy to
> find this setWindowModality() solution. I may be wrong here but I also
> think exec_() available for QtGui.QWidget.
>
> What’s that QtGui.QApplication.activeWindow() you’ve got there? Is that
>> an alternative to getting the shiboken handle, as in Mahmood’s example?
>>
> It was something I came by over at stackoverflow… works great for me in
> both Maya and Nuke (PySide), returns the active Maya window.
> http://qt-project.org/doc/qt-4.8/qapplication.html#activeWindow
> ​
>
> --
> 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/CAD%3DwhWN5_aszKM3w4i%3D4%2Bazk8EqS18c8AOaK5vBtTdzUReULaw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWN5_aszKM3w4i%3D4%2Bazk8EqS18c8AOaK5vBtTdzUReULaw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
[email protected]

-- 
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/CAFRtmOBCJyY-9XONo0CxV6JZyS8FOuUtWmXYyECVt%2BrbT%2BzEjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to