Get Maya 2014 PySide Example!

So I’m seeing more and more Tech Artists making the jump to Maya 2014 PySide. So I’ve
quickly made an example UI which you can load the .ui file or the converted to PySide file.

DOWNLOAD PYSIDE EXAMPLE HERE!


========================================================================
INSTRUCTIONS::
========================================================================

Unzip files into your script directory.
(Keep pyside_example.py, pyside_util.py, pyside_example_ui.py, and pyside_example.ui together )

Open Maya 2014

# To run .ui file
import pyside_example
pyside_example.show_ui()

# To run compiled .ui file
import pyside_example
pyside_example.show_compiled()

Hope this helps answer some PySide questions that are out there.
-Nick

your link 404’s

[QUOTE=passerby;22787]your link 404’s[/QUOTE]

Thanks for letting me know. I’ve checked this on another system, so anyone please let me know if the link doesn’t work. :slight_smile:

Thanks,
-Nick

works fine now

As always, thanks for sharing.

Is it still possible to use QT Designer to create the UI? Was that .ui file generated from designer?

[QUOTE=griffinanimator;22797]Is it still possible to use QT Designer to create the UI? Was that .ui file generated from designer?[/QUOTE]

The .ui file was created with Designer. If you want to open the .ui file in Designer and add a new widget then re-run it in Maya and see it update.

-Nick

So I have everything working just fine but in my console window pyside likes to print out all of this extra stuff like “// pysideuic.properties : setting property text //” Is there any way to suppress this?

[QUOTE=Jredd;22813]So I have everything working just fine but in my console window pyside likes to print out all of this extra stuff like “// pysideuic.properties : setting property text //” Is there any way to suppress this?[/QUOTE]

So i’m gonna answer my own question since I figure some people would like to know. Simply use this when you want to suppress pysides annoying print out.

import logging
pyqtLoggers = ['pysideuic.properties','pysideuic.uiparser']   
for log in pyqtLoggers:   
     logger = logging.getLogger(log)   
     logger.setLevel(logging.ERROR)

Okay so i’m using the xml parse method and i’m running into an issue with brigining in a ui file that has a QtWebkit object. I keep getting

// Error: ImportError: file <string> line 79: No module named QtWebKit.QWebView //

not exactly sure how to handle this issue. Any ideas?

I know it’s happening when parsing the file and the script ties

    pyc = compile(o.getvalue(), '&lt;string&gt;', 'exec')
    exec pyc in frame