I'm trying to setup a scriptJob for a Qt window.
But in order to do that, I need the name of the window in the UI hierarchy.
You probably know, we can set the Object Name to a Qt object to get names for the windows
|parentname|childname|...
instead of empty strings:
|||...
The problem with a QMainWindow, its central widget, or whatever widget you are trying to query, is that the path is not fully unique... and if you send that to the API, it returns an empty string or fails.
win = wdg.QMainWindow() // no matter if I assign a parent to the maya window
wdg.QWidget()
win.setCentralWidget(wdg.QWidget())
win.show()
The full name is always empty.
mui.MQtUtil.fullName(long(shiboken2.getCppPointer(win.centralWidget())[0]))
No matter what I do.
I know there must be a way to fix the hierarchy path to a window you create in Qt... it must be really easy.
Thanks!