Install PyQt5 and First PyQt5 Application

preview_player
Показать описание
Python is a language that can be used to build advanced programs. For this, it is necessary to be able to create user interfaces. There are several libraries for this; some have been ported to Python.
Tkinter is installed by default with Python. It is an already old library, coming from Tk
PyGtK allows to produce graphical interfaces using the GtK + 2 library. It has been replaced by PyGObject, which uses the GtK 3 library.
PyQt and PySlide use Qt, which is a library available under two different licenses depending on their use for the realization of a commercial application or not.
We will discuss in this course PyQt, for which it is easier to find a simple installation mode on Windows. At the time of writing this course, the library is version 5.5.1, compatible with Python 3.4. Beyond a library for creating a graphical interface, PyQt also embeds many components, in the form of specialized modules. In this introductory course, we will only use the QtCore and QtGui modules, among the twenty available.
PyQt is a free library which allows to link the Python language with the Qt library distributed under two licenses: a commercial one and the GNU GPL. It thus allows to create graphical interfaces in Python. An extension of Qt Creator (graphical utility for creating Qt interfaces) allows you to generate Python code for graphical interfaces.
We are going to study the programming of graphical interfaces (in English, we speak of GUI: Graphical User Interface) thanks to PyQt5 which allows to use the Qt version 5 library with Python.
See as well
Creation of a first window
To create a first window, we will use the QWidget class.
Here is a very simple program for creating a graphics window.
Creation of a personalized window
If we now want our window to have other functionality than what exists in the QWidget class, we need to create a derived class to which we can add additional attributes and methods.
Handling of mouse events in the window
To interact with the user, we will need to perform event programming. It will therefore be a matter of managing the events that will be triggered by the user (pressing the mouse, etc.).
Рекомендации по теме
Комментарии
Автор

Salut merci beaucoup c'est ce que j'attendais depuis longtemps

fatehbouziane
Автор

very helpful video ! can i please have the name of the song played in the background ?

greyrabbit
Автор

gracias amigo COOOÑÑOOOO me funcionó que flipas ya que no sabía hacerlo por gilipollas

santiagoramirez
welcome to shbcf.ru