I found some tutorials online for earlier versions of Ubuntu but they didn't seem to work on Ubuntu 14.10; either that or I was doing it the wrong way.
I want to use Qt Designer to design a GUI, use PyQt to covert it to .py, then use it in Python.
What packages do I need to install to do this?
All the tools you need are included in Ubuntu repositories. You must install the package
qtcreator
, which has an integrated QtDesigner, and the packagepyqt5-dev-tools
, which providespyuic5
, a utility that generates Python code from.ui
files.Run these in a Terminal:
Run PyQt5 Designer, located at:
Run PyQt5 User Interface Compiler (PYUIC5) to convert .ui to .py
Run PyQt5 Resource Compiler (PYRCC5) to convert .qrc to .py
python3
.sip
.python3-pip
.pip3 install pyqt5
Well, I documented the steps for Installing pyqt5 with qt designer and code generation here: https://gist.github.com/ujjwal96/1dcd57542bdaf3c9d1b0dd526ccd44ff
With this you can generate the code from Qt Designer itself.
Installation
Configuring to run from terminal
OR
Write the following in
/usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
Code Generation
Create
uic.py
file.Create a symlink:
Desktop Entry
save in
~/.local/share/application
with.desktop
extension