O'Reilly logo

PySide GUI Application Development by Venkateshwaran Loganathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Table and form views

This section is devoted to explaining the representation of data in a form view or a table view. But, before that we can see some examples of accessing databases through high-level model classes. The following classes are available in Qt for this purpose:

  • QSqlQueryModel: Provides a read-only data model for SQL result sets
  • QSqlTableModel: Provides an editable data model for a single database table
  • QSqlRelationalTableModel: Provides an editable data model for a single database table, with foreign key support

Let us view some quick examples of each of these classes.

QSqlQueryModel

This model aims at providing a high-level interface for executing SQL queries and traversing the result set. This class is built on top of the QSqlQuery ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required