简体   繁体   中英

Problems with Qtdesigner(Python)

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)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM