Python PyQt5 complete Setup Windows

PyQt5 is a very powerful python gui development framework. This post shows the complete installation and setup of PyQt5 with qt designer tool.

First you need to install Python for this. ALso, make sure the the path is added to the path vatiables. Then open the Windows terminal, cmd and type pip and press enter. If it shows an error then that means, python is not added to path. If it works, then follow the below steps to install and setup pyqt5.



PyQt5 Installation Setup


$ pip install pyqt5

Type the above code in Windows terminal and press Enter key. Wait for the installation

PyQt5 Tools Setup


$ pip install pyqt5-tools

This code will install PyQt5 tools such as qt designer to make the gui.

Qt Designer path

C:\Users\$Username$\AppData\Local\Programs\Python\Python39\Lib\site-packages\qt5_applications\Qt\bin



Note: Edit the $username$ with your username in the above path.

This is how the qt designer window looks like...
Qt designer mrdevknown tutorial. Setup PyQt5 and install qt designer for python.


So, I think that's it for this post... See you in the next.

When you are working with PyQt5, you are using the default OS style of application. The design looks very simple for apps. So, if you are making a cutom app, you will cuystomise the top bar in few cases to have a better design. So, when you are customising the design, you will see that the window has no longer been movable. Thus, you need to write the logic to make the window movable again.
The default Window app style looks like this

The code for doing this is given below...

PyQt5 draggable window Code














0 Comments