I am not using QmainWindow but neither is the original tutorial, so I am not sure. I will look into it. I did originally start using hand written code for ui, but the temptation of designer pulled me away but I will return to hand written code as it will help with the memory and getting to know the qt classes and functionality. Thanks Justin, sound advice yet again. ;)
Hopefully, once I get more involved, I can go back to watching/learning from the CMI Vfx maya python vids I bought a while ago. On Thu, Nov 6, 2014 at 5:54 PM, Justin Israel <[email protected]> wrote: > I only used Designer when I was first learning Qt, so that I could > visually lay out the UI design. Eventually you will find that it is much > easier to just write the UI by hand in code. It ends up being less cruft > from the autogenerated stuff, and less to manage with needing to convert > the UI files. If you use images via the Designer, it will require a > resource file. But if you do it by hand in code, you can directly reference > the image path. For now you can keep using Designer. But an interesting > thing to do would be to convert it outside of Maya, using pyuic, and read > what code the Designer ended up creating. > > Are you using a QMainWindow as your base class? If not, that would explain > the error. > > On Fri, 7 Nov 2014 2:52 AM Credible Mulk <[email protected]> > wrote: > >> Ok, so removing the resource file worked and I have got the ui open in >> maya but I had to change /omit a line which seems to work in the tutorial >> file. >> >> # Error: AttributeError: file >> Z:\ddtest\Malc\burrows_MayaTools\burrowsMirrorTool\brrwsMirrorScript.py >> line 17: 'brrwsMirrorScript' object has no attribute >> 'setDockNestingEnabled' # >> >> if I omit the line from my script and run the tool from the shelf button >> I have, its ok, if I uncomment the line, I get this error. There must be a >> logical reason as to why it works in the tutorial, but not in my script. >> All I have done is to substitute the tutorial name for my own and I have >> been careful to make sure that where the tutorial has specific names for >> objects, I have done the same, but I keep getting the error. >> >> Cheers guys >> >> On Thu, Nov 6, 2014 at 1:32 PM, Credible Mulk <[email protected] >> > wrote: >> >>> Hi Justin, thanks for the reply. I will give it a go without a qrc file >>> and see if it works. Currently only using it for a ui icon, so not overly >>> important right now.Do you use QTDesigner for a UI layout? If not, >>> where/how do you create a ui for maya using Python. >>> >>> Many thanks >>> >>>> >>>>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Python Programming for Autodesk Maya" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/python_inside_maya/cBSUHDF7-Ag/unsubscribe >>> . >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/python_inside_maya/85f95ba1-204c-4bb1-9cf9-371f6edbefe0%40googlegroups.com >>> <https://groups.google.com/d/msgid/python_inside_maya/85f95ba1-204c-4bb1-9cf9-371f6edbefe0%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/CAJ7OuxeA4qKMmfc6-2UuDoSb5sfswsQASb%3DUN%2BJazhKRDuPWsw%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAJ7OuxeA4qKMmfc6-2UuDoSb5sfswsQASb%3DUN%2BJazhKRDuPWsw%40mail.gmail.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 a topic in the > Google Groups "Python Programming for Autodesk Maya" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/python_inside_maya/cBSUHDF7-Ag/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3P-CQmv5_oAsOASqTsotGYZ_C00PgpDhj9vtsy1tA7TQ%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3P-CQmv5_oAsOASqTsotGYZ_C00PgpDhj9vtsy1tA7TQ%40mail.gmail.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/CAJ7OuxcgvtP8VSnBhwdhZ62BkdHkg37PQkYoWAKHDHg6hJ1XNg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
