In this recipe, we will be learning to fetch rows from a given database table and display them in tabular format via the Table widget. We assume a table called Users consisting of two columns, EmailAddress and Password, already exists in a database called ECommerce. Also, we assume that the Users table contains some rows in it.
Displaying rows in the specified database table
How to do it…
Follow this step-by-step procedure to access rows from the database table in SQLite:
- Let's create an application based on the Dialog without Buttons template.
- Add three QLabel widgets, two QLineEdit widgets, one QPushButton, and one QTableWidget widget to the form by dragging and dropping three Label widgets, two Line Edit widgets...