You said you are using pyqt4 designer which I’m guessing you mean qt4 designer. Since Maya is built using qt5, maybe try updating to qt5 designer?
On Sun, Dec 24, 2017 at 03:02 Nitin Singh <[email protected]> wrote: > > > Hi Guys, > > I am having this issue in maya 2018. > > I made a UI in pyqt4 designer. I got it all working but for some reason > Maya launches new version of UI when I run the script. It doesn't close the > old already opened UI. > The title of window is different and scaling doesn't work. I have tried to > solve it for few days but it doesn't work at all, any help will great. > I have attached the print screen of Maya and designer along with the .UI > file I am laoding in Maya 2018. > > > ######################################################################################################################################################################## > > ######################################################################################################################################################################## > > from maya import cmds > from maya import mel > from maya import OpenMayaUI as omui > import os.path > import os, glob, time > import sys > import getpass > import maya.mel as mel > > > try: > from PySide2.QtCore import * > from PySide2.QtGui import * > from PySide2.QtWidgets import * > from PySide2.QtUiTools import * > from shiboken2 import wrapInstance > except ImportError: > from PySide.QtCore import * > from PySide.QtGui import * > from PySide.QtUiTools import * > from shiboken import wrapInstance > > > > > mayaMainWindowPtr = omui.MQtUtil.mainWindow() > mayaMainWindow = wrapInstance(long(mayaMainWindowPtr), QWidget) > > class CreateNodeUI(QWidget): > def __init__(self, *args, **kwargs): > super(CreateNodeUI,self).__init__(*args, **kwargs) > self.setParent(mayaMainWindow) > > self.setWindowFlags( Qt.Window ) > self.initUI() > > > def initUI(self): > loader = QUiLoader() > file = QFile("C:/Users/nitin.singh/Desktop/polyReduce_001.ui") > file.open(QFile.ReadOnly) > self.ui = loader.load(file, parentWidget=self) > file.close() > > > > def main(): > ui = CreateNodeUI() > ui.show() > return ui > if __name__ == '__main__': > main() > > > ######################################################################################################################################################################## > ######################################################################################################################################################################## > > > -- > 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/bf1f0625-4a7b-4ba8-b9b1-73abf4b4477e%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/bf1f0625-4a7b-4ba8-b9b1-73abf4b4477e%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/CAOOm49Q92PxwS%2Bji1VYQ%3D2T2U-53AHOzTTskWwso-Eb6NLEh3w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
