Navigating through the rows of the specified database table
In this recipe, we will be learning to fetch rows from a given database table one at a time. That is, on running the application, the first row of the database table will be displayed. You will be provided with four push buttons in the application, called Next
, Previous
, First
, and Last
. As the name suggests, upon clicking the Next
button, the next row in the sequence will be displayed. Similarly, upon clicking the Previous
button, the previous row in the sequence will be displayed. Upon clicking the Last
button, the last row of the database table will be displayed and, upon clicking the First
button, the first row of the database table will be displayed.
How to do it…
Here are the steps to understand how rows from a database table are accessed and displayed one by one:
- Let's create an application based on the
Dialog without Buttons
template. - Add three
QLabel
widgets, twoQLineEdit
widgets, and fourQPushButton
 widgets to the form by...