Hey Justin,

Arh, I see. I was trying on mac, but it seems to be working as I intend on
Windows 10. Maya version is 2018 in both cases. Any idea how I can make it
work on mac too? Thanks

On Thu, 29 Nov 2018 at 15:22, Justin Israel <[email protected]> wrote:

> Which version of Maya and which operating system are you using? Setting
> the parent to the Maya main window, the way you are doing, should result in
> the window staying above Maya (tested on Linux/Maya 2018). However it won't
> force it to stay above every single child window in Maya.
>
> Justin
>
>
> On Thu, Nov 29, 2018 at 10:38 PM Jakob Kousholt <[email protected]> wrote:
>
>> Hi,
>>
>> So I am slowly getting the hang of pyside, but a thing I have postponed
>> too long is to figure out how to make the UI sit on top of mayas main UI
>> like every other UI inside of maya. So far my code is this: (any other
>> unrelated tips on a better boileterplate is most welcome too)
>>
>> from PySide2 import QtCore, QtGui, QtWidgets
>> from shiboken2 import wrapInstance
>>
>>
>> import maya.OpenMayaUI as omui
>>
>> def maya_main_window():
>>     main_window_ptr = omui.MQtUtil.mainWindow()
>>     return wrapInstance(long(main_window_ptr), QtWidgets.QWidget)
>>
>> class gSubmission(QtWidgets.QMainWindow):
>>
>>     def __init__(self, parent=maya_main_window()):
>>         super(gSubmission, self).__init__(parent)
>>
>>         self.setWindowTitle("Temp")
>>
>>
>> if __name__ == "__main__":
>>
>>     try:
>>         ui.close()
>>     except:
>>         pass
>>
>>     ui = gSubmission()
>>     ui.show()
>>
>>
>>
>> --
>> 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/678a5041-d94d-4403-bb03-78ef3b3d6db4%40googlegroups.com
>> <https://groups.google.com/d/msgid/python_inside_maya/678a5041-d94d-4403-bb03-78ef3b3d6db4%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/CAPGFgA01dFt4wSwNKADZ7yG7x40yF9vpuTgN3jjxDQ8ra7fYWw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA01dFt4wSwNKADZ7yG7x40yF9vpuTgN3jjxDQ8ra7fYWw%40mail.gmail.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/CAEKd6ba9BxzcvBde8j5tBwG4k0Z9TvS%3D4jQD1bVTH88FFXPcTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to