C++ GUI Programming with Qt 3 [Electronic resources]

Jasmin blanchette; Mark summerfield

نسخه متنی -صفحه : 140/ 78
نمايش فراداده

Chapter 12. Databases

Connecting and Querying

Presenting Data in Tabular Form

Creating Data-Aware Forms

Qt's SQL module provides a platform- and database-independent interface for accessing SQL databases, and a set of classes for integrating databases into the user interface.

The chapter begins by showing how to open database connections and how to execute arbitrary SQL statements on a database. The second and third sections focus on providing the user with ways of viewing and modifying a database through the user interface, using QDataTable to present data in a table widget and using QSqlForm to present data as a form. These classes are designed to interact nicely with each other, making common database idioms such as masterdetail views and drill-down easy to implement.