Author: byte-engineer
- A workshop for designing Graphical User Interfaces
GUIWith python. - There is many python librarys To create 'GUI' like (PyGame, tkinter)
- We Will Use A frameWork called 'PyQt5'.
- We will learn about GUIs.
- Basics of PyQt5 framework.
- Some projects done with this frameWorks.
- We will jump to QtDesigner.
- We will create a simple GUI for logging interface.
- Basics About coding in PyQt.
- It stands for Graphical User Interface.
- It make dealing with the programe way easier.
- GUIs make the programmes accessable to non-programmers and normal people.
- GUIs are highly required in commercial projects.
- Almost all programmes has a front-end which care about designes and Back-end which care about main implementation.
Note
this requirments required if you want to Do the parctical application.
- I recommend Windows 10/11 as an operating system.
- NOTE: personally i don't know how to deal with macOS or linux So use it in your responsibility.
- I don't know if this Will run on (portable devices like tablets or smartphone) but as i know python dosn't run on 'ARM' architecture.
- In this workshope, We will use python to deal with (Qt frameWork).
- In this workshop I will NOT teatch you python basics.
- But I will leave python cheat-sheet for learning python (So bueatifull and I spent on writing it handreds of hours literally) enjoy it.
- People who come from Other programming languages I think thay will be able to understand python code easily it's easiest programming language in the earth.
- Official website: python
- NOTE: Do NOT Forget to add python in your system PATH. ❗Please Please Please.
- New macOS versions has python pre-installed as I know.
- Make sure you installed 'pip' Official python package manager.
- We recommend visual studio Code (VSCode).
- Please Don't use python IDE it's So bad.
- Use this commend
pip install PyQt5. - If you want To remove It later use the command 'pip uninstall PyQt5'.
- Use vertual environment if you know it. But I will not use it for educatianal reasons. Actually I don't care.
INFO About PyQt5 1
- This FrameWork has been written in
C/C++So, it's so responsive and fast. - This framework is open-source but It protected by GPL license.
- The FrameWork has so many sub-modules like QtWidgets, QtCore, QtGui and many Others.
- I will give you a cheat Sheet that I wrote my self. it contains most important functions and classes that you will need.
- For ease we will use QtDesigner Because it has simple Drag-Drop interFace.
- coding is more fluxable and suitable for large programms.
- if you aim for a professional project (or you love programming) use direct code. 'quality tax'
- This Framework is so popular in the indestry. It used in adobe photoshop, autoDesk maya and many more.
- When you download the programme open it.
- A small dialogue window will pop-up. choose main window.
- then directly start drag and drop.
- We recommend to use layouts on your design. This make the app interactive.
- QtDesigner is Generate file with
.iuextinsion which is a file describes the UI features and elements. - Use this commend to convert ur project to to python file
pyuic5 -x app.ui -o app.py. - You can view the emited file in any code editor you will notice that the is normal python file with PyQt5 library.
- The file is unreadable and hard to understand it.
- In most cases we access the
.pyGenerated file as a library. - To access the file put it beside the main python file.
Footnotes
-
Actually we can use the latest version (PyQt6) but I used to use older version(o_o). Also there is no big differece between thim. ↩

