Is this inputWin.setAttribute(QtCore.Qt.WA_DeleteOnClose)
The same as overriding close method with deleteLater ? On Friday, February 27, 2015 at 1:53:33 PM UTC+7, Justin Israel wrote: > > # anmgToolUI > def editSelected(self): > inputWin = PublishInfoUI() > inputWin.show() > > You are creating that widget without a parent, so it gets garbage > collected immediately and you never see it. > > Try calling it with: > > inputWin = PublishInfoUI(self) > inputWin.setAttribute(QtCore.Qt.WA_DeleteOnClose) > inputWin.show() > > That will make sure you don’t leak the window reference when you close > it. Or you can do this if you want a modal dialog: > > inputWin = PublishInfoUI() > inputWin.exec_() > > Justin > > > > On Fri, Feb 27, 2015 at 7:39 PM likage [email protected] > <http://mailto:[email protected]> wrote: > > Hi all, sorry if my following question sounds stupid but I am pretty much > in a lost, big way! > > I have created 2 UIs using the Qt-Designer. > Main UI (anmgToolUI) - http://pastebin.com/raw.php?i=JeZ9rKBC > Sub UI (publishInfoUI) - http://pastebin.com/raw.php?i=LK2P8pQ0 > > And the following is the main code: > Main Code - http://pastebin.com/raw.php?i=Q3Xhk1Qa > > And I am using the following to run it in Maya: > > import sys > sys.path.insert(0, ‘/user_data/dev_test/anmg/‘) > import mainTool > reload(mainTool) > win = mainTool.MigrationUi() > win.show() > > So basically what I am trying to achieve here is that, when the > MigrationUI is booted, upon clicking on the “Edit Selected” button, it > should boot up the sub UI, but sadly it is not in this case. > I did add a print statement within “PublishInfoUI” class, while it is > printing and indeed reading it, it does not seems to execute within. > > I had needed this sub UI as later on I will need it to display the items > selected in the QTreeWidget and mapped it onto the sub UI. > > Any pointers? > > — > 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] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/4a9d4782-5f81-49a6-907b-c03f81b9ac44%40googlegroups.com > > <https://groups.google.com/d/msgid/python_inside_maya/4a9d4782-5f81-49a6-907b-c03f81b9ac44%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/9d847ab0-b688-48e1-94a6-6e59e13be325%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
