

PyQt5: The Quick and Easy Guide
source link: https://dev.to/jones268/pyqt5-the-quick-and-easy-guide-92k
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

PyQt5: The Quick and Easy Guide
Apr 3
・2 min read
PyQt5 is a software toolkit for creating graphical user interfaces (GUIs) for Python programs. Written in Python, it runs on Linux, Windows and Mac OS X. It uses the Qt framework, which is written in C++. PyQt5 is released under the GPLv3.
PyQt5 is an updated version of the original PyQt toolkit. PyQt4 was written for Qt 4 but has continued to work with Qt 5 for the most part.
However, some features of Qt 5, such as Qt Quick, are not supported by PyQt4 and so were not included in PipyQt4. The new PyQt5 inherits all of PyQt4’s features while adding support for these new features.
If you are new to Python PyQt, I recommend this course
Hello world
The Qt widget library lets application developers create rich GUI applications for the desktop and a variety of mobile devices.
The Python bindings for Qt are provided by the package PyQt5. In this tutorial, you will learn how to start using Python to develop GUI applications that use the Qt widget library.
You will need to have Python 3.6 or later installed on your computer before you begin. If you don’t, please go here for details about downloading and installing Python 3 on your computer.
All of the basics should be the same for other OSes. You can find the tutorial here.
The first step is to install QT5.
The next steps are to install PyQt5 and set it up to use with Python 3.4. I recommend installing PyQt5 like so:
pip3 install PyQt5
You can then run the code below to try it out:
import sys
from PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
w = QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Hello World')
w.show()
sys.exit(app.exec_())
PyQt comes with many widgets like buttons, tabs, sliders, images and lots of others.
Recommend
-
104
Python - @cosven - ![image]( https://user-images.githubusercontent.com/4962134/43041767-ba8960a6-8d9c-11e8-891a-7d65203
-
55
The Cloud It has been a minute since I gave much love or attention to
-
15
10 Easy Website Accessibility Quick Tips and RecommendationsDigital accessibility encom...
-
7
Drew Ronk Posted on Mar 13...
-
4
5 Quick and Easy Ways to Open Apps on Mac By Dilum Senevirathne Published 14 minutes ago It's a breeze to open yo...
-
5
Multitenancy Multitenancy is when multiple applications share an environment. In our scenario this environment is the identity management library ASP.NET Identity v2.2 where we want to allow multiple organisations to store two diffe...
-
17
10 quick and easy ways to test for usability Ultimately the aim of any website is to be a space that users come back to time and time again and recommend to others. In order to create this dream scenario, a website needs to fulfil the...
-
2
Support is great. Feedback is even better."The feedback we've received has been truly amazing as we iterate on building our platform! If you created your first trip and signed up, THANK YOU for trying out HeyHaddock! We are always ea...
-
11
Jetpack Compose Permissions: A Quick and Easy Guide Android • Aug 4, 2023 Permissions and Android have quite a long history. At...
-
4
Easy and Quick Video Tutorials for the CSES Problem Set Easy and Quick Video Tutorials for the CSES Problem Set ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK