Example #1
0
def run(serializer):

    global mainWin
    if not mainWin:
        ptr = apiUI.MQtUtil.mainWindow()
        if ptr:
            mainWinQObject = shiboken2.wrapInstance(long(ptr), QtWidgets.QMainWindow)
        else:
            raise Exception('Cannot find Maya main window.')
        mainWin = qt_window_test.TestQtWindow(qt_window_test.TestQtWindow.QtTypePySide, serializer, parent=mainWinQObject)

    mainWin.show()
    mainWin.raise_()
Example #2
0
import sys

from fxpt.qt.pyside import QtWidgets

import qt_window_test


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    win = qt_window_test.TestQtWindow(qt_window_test.TestQtWindow.QtTypePySide, 'SerializerFileJson', parent=None)
    win.show()
    app.exec_()
    sys.exit()