I’m scratching my head here… why does this window when launched in Maya
2017 not stay on top of the main Maya window?
If you click outside this window, it’ll disappear behind the main Maya
window.
I just want this window to behave like e.g. the hypershade or any other
editor which floats atop Maya and doesn’t lock up the main Maya window in
any way.
What did I do wrong?
from PySide2 import QtWidgets, QtCore
class ToolWindow(QtWidgets.QMainWindow):
def __init__(self):
super(ToolWindow, self).__init__()
self.setWindowFlags(QtCore.Qt.Tool)
self.widget = QtWidgets.QWidget()
self.layout = QtWidgets.QVBoxLayout()
self.button = QtWidgets.QPushButton('Yoghurt')
self.layout.addWidget(self.button)
self.widget.setLayout(self.layout)
self.setCentralWidget(self.widget)
window = ToolWindow()
window.show()
// Fredrik
--
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%3DwhWM%3Dcwr0mcMgVhG_%2ByvC6p_9KCjf%2BdZC19vAN4Gc_iCR3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.