1
votes

When i try to use button "show my code" in Qtdesigner i got this error (Unable to launch CPython33/Lib/site-packages/PyQT4/bin\uic). So, the only thing that i can do is creating new widgets in Qtdesigner. Then i save this file and open it in another programm (for example:eclipse) to edit my code. But it is not easy to do this every time i want to add a new widget.BTW: i dont want to use such libs as Tkinter because Qtdesigner is more useful but if there is no solution of my problem i will use it .I hope you will help me)

1
possible duplicate of Unable to Launch Qt uic - Fiver

1 Answers

0
votes

If you want to see the Python code then you'll need to use the pyuic located in \Lib\site-packages\PyQt4

C:\<Python Path>\Lib\site-packages\PyQt4> pyuic4 <full path and filename of your ui file> > <full path and filename you want for your .py file>

So for my recent project I'd use:

C:\Python33\Lib\site-packages\PyQt4> pyuic4 C:\saas\saastool.ui > C:\saas\saastool_ui.py

Also make sure to convert your resource file using pyrrc4, with the -py3 flag if you're using python 3. you can just type 'pyrrc4' to get the options list.