Hi, <br><br>I manged to edit that cod but still I am getting some errors.<br>def loadUiType(uiFile):<br>        """<br>        Pyside lacks the "loadUiType" command, so we have to convert the ui file to py code in-memory first<br>
        and then execute it in a special frame to retrieve the form_class.<br>        """<br>        parsed = xml.parse(uiFile)<br>        widget_class = parsed.find('widget').get('class')<br>
        form_class = parsed.find('class').text<br>    <br>        with open(uiFile, 'r') as f:<br>            o = StringIO()<br>            frame = {}<br>            <br>            pysideuic.compileUi(f, o, indent=0)<br>
            pyc = compile(o.getvalue(), '<string>', 'exec')<br>            exec(pyc, frame)<br>            <br>            #Fetch the base_class and form class based on their type in the xml from designer<br>
            form_class = frame['Ui_%s'%form_class]<br>            base_class = eval('QtGui.%s'%widget_class)<br>        return form_class, base_class<br><br>temp=os.path.join(os.path.split(__file__)[0],'create_connection_dlg.ui')<br>
FormClass, BaseClass = loadUiType(temp)<br><br>This is my code and errors are<br> File "create_connection_dlg.py", line 39, in <module><br>    FormClass, BaseClass = loadUiType(temp)<br>  File "create_connection_dlg.py", line 29, in loadUiType<br>
    pysideuic.compileUi(f, o, indent=0)<br>  File "/disk/ve/dev/ameya.dambir/install/p4workspace/products/dotrox/py32/linux-amd64-gcc_4_1-release/lib/python3.2/site-packages/pysideuic/__init__.py", line 142, in compileUi<br>
    winfo = compiler.UICompiler().compileUi(uifile, pyfile, from_imports)<br>  File "/disk/ve/dev/ameya.dambir/install/p4workspace/products/dotrox/py32/linux-amd64-gcc_4_1-release/lib/python3.2/site-packages/pysideuic/Compiler/compiler.py", line 91, in compileUi<br>
    w = self.parse(input_stream)<br>  File "/disk/ve/dev/ameya.dambir/install/p4workspace/products/dotrox/py32/linux-amd64-gcc_4_1-release/lib/python3.2/site-packages/pysideuic/uiparser.py", line 859, in parse<br>
    document = parse(filename)<br>  File "<string>", line 62, in parse<br>  File "<string>", line 38, in parse<br>cElementTree.ParseError: no element found: line 1, column 0<br><br>Can anybody help??<br>
<br>Ameya<br><br><div class="gmail_quote">On Tue, Oct 16, 2012 at 5:10 PM, Jens Lindgren <span dir="ltr"><<a href="mailto:jens.lindgren.vfx@gmail.com" target="_blank">jens.lindgren.vfx@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>He has a example code on that page, did you check it out?</div><div> </div><div>/Jens<br><br></div><div class="gmail_quote">
<div><div class="h5">On Tue, Oct 16, 2012 at 12:54 PM, ameya dambir <span dir="ltr"><<a href="mailto:ameyadambir@gmail.com" target="_blank">ameyadambir@gmail.com</a>></span> wrote:<br>
</div></div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div><div class="h5">Hi,<br><br><br>I have an old codefromPyQt which I am migrating to PySide. <br>

I am trying to import uic module, but I am getting an error. I am not sure whether this is installed correctly or not and about using it.<br>  <br>
>>from PySide import QtGui,uic<br>ImportError: cannot import name uic<br><br><br>This what I am looking at.<br>What is the meaning of the directory named pysideuic?<br><br>I read on this page "<a href="http://nathanhorne.com/?p=451" target="_blank">http://nathanhorne.com/?p=451</a>" that pysideuic has lacking a function loadUiType, is it true?<br>


If yes then how should I port my code?<br>Can any body help?<br><br>Thanks in advance!!<span><font color="#888888"><br><br>Ameya<br><br><br>
</font></span><br></div></div>_______________________________________________<br>
PySide mailing list<br>
<a href="mailto:PySide@qt-project.org" target="_blank">PySide@qt-project.org</a><br>
<a href="http://lists.qt-project.org/mailman/listinfo/pyside" target="_blank">http://lists.qt-project.org/mailman/listinfo/pyside</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div>Jens Lindgren</div>
<div>--------------------------</div>
<div>Lead Technical Director</div>
<div><a href="http://www.magoo3dstudios.com/" target="_blank">Magoo 3D Studios</a></div><br>
</font></span></blockquote></div><br>