Source code: https://www.tresfacile.net/la-bibliotheque-graphique-pyqt5/
Créer une fenêtre PyQt5 ou PyQt6 selon l'approche objet Python est une opération légèrement différente de celle que nous avons déjà vue: créer une première fenêtre pyqt5 ou pyqt6, on doit préalablement importer depuis le module QtWidgets les classes nécessaires: QApplication, QWidget, QLabel, QPushButton, QLineEdit, QMenuBar...
On crée ensuite une classe Python nommée MYWindow qui hérite de la classe QWidget. On crée ensuite le constructeur de la classe au sein duquel on insère la commande super.__init__ afin d'hériter toute les propriétés et méthodes de la classe mère.
On doit ensuite créer une instance objet sur la classe QApplication puis on crée une première fenêtre à l'aide d'une instanciation sur la classe QWidget et on applique ensuite la méthode .show pour visualiser la fenêtre PyQt5. Ce tutoriel PyQt Python a été réalisé à l'aide de la version Python 3.6 Windows 10 , Python 3.7 Windows 10, Python 3.8 Windows 10 et Python 3.9 Windows 10, et cela a présenté des bug avec Python 3.10 Windows 10. L'IDE utilisé est Wig 7. Pour un visionnage de qualité, utiliser le navigateur google chrome.
Creating a PyQt5 or PyQt6 window according to the Python object approach is a slightly different operation from the one we have already seen: creating a first pyqt5 or pyqt6 window, we must first import from the QtWidgets module the necessary classes: QApplication, QWidget, QLabel , QPushButton, QLineEdit, QMenuBar ...
We then create a Python class named MYWindow which inherits from the QWidget class. We then create the constructor of the class in which we insert the super .__ init__ command in order to inherit all the properties and methods of the parent class.
We must then create an object instance on the QApplication class then we create a first window using an instantiation on the QWidget class and we then apply the .show method to view the PyQt5 window. This PyQt Python tutorial was made using Python 3.6 Windows 10, Python 3.7 Windows 10, Python 3.8 Windows 10, and Python 3.9 Windows 10, and this showed bugs with Python 3.10 Windows 10. The IDE used is Wig 7. For quality viewing, use the google chrome browser.
Ce tutoriel python a été réalisé avec l'IDE Python Wing Python 3.7 - Windows 10 et a été testé sur les autres version de python: Python 3.8 - Windows 10 et Python 3.9 - Windows 10. Pour un visionnage de qualité, utiliser le navigateur google chrome.
Tutoriel Python: https://www.youtube.com/watch?v=eDwQxJ9zvco&list=PLh-rUZWaw76Grm5uRdntEhupKs-8pC4My
Liste des cours Python sur très facile FR: https://www.tresfacile.net/python/
Python Courses on my-courses.net EN: https://www.my-courses.net/p/python-courses_17.html
Python Exercises on my-courses.net EN: https://www.my-courses.net/p/python-exercises-with-solutions.html
Exercices Python avec Solutions
- Exercices sur les les listes & chaines de caractères Python: https://www.youtube.com/watch?v=8dPcYnbGmqw&list=PLh-rUZWaw76H854IJM3NXVGWbE8o_cuw7
- Exercices sur les fichiers Python: https://www.youtube.com/watch?v=oxD3NZe_1HU&list=PLh-rUZWaw76EHCZVHpScyXRRazzFvyUz1
- Exercices sur les classes & programmation orientée objet POO Python: https://www.youtube.com/watch?v=dkmDkfbHEc4&list=PLh-rUZWaw76FrNLujhNn3vURrs1J2DZOd
- Exercices sur les interfaces graphiques Python GUI Tkinter: https://www.youtube.com/watch?v=9Gwmpa1J84Y&list=PLh-rUZWaw76HFoWZi9G8f3SJHXk30iGMr
- Exercices sur les dictionnaires Python: https://www.youtube.com/watch?v=5jlM-6YI-O4&list=PLh-rUZWaw76EuONzNrnK3fURIbv1OrLLA
- TP & TD Python avec solutions: https://www.tresfacile.net/tp-python-avec-solutions/
Python et les bases de données SQLite3: https://www.youtube.com/watch?v=jXEf84OlU6A&list=PLh-rUZWaw76G3l6kN0sbZNVrkWCQjLnPo
Projets en Python: https://www.youtube.com/watch?v=tDcIfyoV2tk&list=PLh-rUZWaw76GiHJjnGKgDoveKF1nzgjIV
Python Django: https://www.youtube.com/watch?v=tZ4LXyJAj3w&list=PLh-rUZWaw76H5XOcYneHhuvypENDCkpAf
PyQt5 débutant GUI Python: https://www.youtube.com/watch?v=J1KbOSsYuGQ&list=PLh-rUZWaw76EtCK1zGoA-2SMX2S-6Rn_U
Learn PyQt5: https://www.youtube.com/watch?v=HIN4T3nf_oY&list=PLh-rUZWaw76HO0RRPyA5Khx6XZJoAheKN