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, one Push Button widget, and a Table widget on the form.
- Set the text property of the two Label widgets to Enter database name and Enter table name.
- Delete the text property of the third Label widget because its text property will be set through code.
- Set the text property of the push button to Display Rows.
- Set the objectName property of the two Line Edit widgets to lineEditDBName and lineEditTableName ...