Páginas

viernes, 22 de noviembre de 2019

Python, Qt and MariaDB

Hi everyone, I'd like to share the next code for beginners in Python, Qt and MariaDB with a little explanation, the code is available in GitHub https://github.com/gerasua/openwindows. When you try to create one app for Windows desktop you think in Java, .Net but this time I want to show you how to create a Desktop App with Python and Qt for Windows, this App have a login authentication and help to you to understand how works Python and Qt, for this we need to use PyQt5. We build windows with Qt Designer 


You need create your database, here I show you how to install XAMPP

When you have your windows designs you need code in Python, but first install dependencies, pyqt5 and mysql-connector, open a terminal and install
$ pip install pyqt5
$pip install mysql-connector

Open you editor, I like Pycharm Community Edition


but how works?
You Login with the next users and passwords
Level 1
user: operator
password: operator


You're available to send value to another window


You can read the value from the previous window


Finally you logout closing the window or press the scape key





Level 2
user: supervisor
password: supervisor






Level 3
user: admin
password: admin