How it works…
You can see in the script that the click event of the push button with the objectName property pushButtonInsertRow is connected to the InsertRows() method. This means that, whenever this push button is clicked, the InsertRows() method will be invoked. In the InsertRows() method, an INSERT SQL statement is defined that fetches the email address and password entered in the Line Edit widgets. A connection is established with the database whose name is entered in the Line Edit widget. Thereafter, the INSERT SQL statement is executed, which adds a new row to the specified database table. Finally, the connection to the database is closed.
On running the application, you will be prompted to specify the database name, table name, and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access