This file has been tested with PostgreSQL 6 and PostgreSQL 7. Note that the examples in this chapter all use the tables, views and records which are defined in the qt/tools/designer/examples/book/book.sql file. If you want to build the 'book' examples you will need to create the example schema on your database. A great deal of functionality is available from the classes directly in Qt Designer although subclassing is always available for finer control. It also explains how to drill down from a QDataTable to another widget, for example, to a QDataBrowser or a QDataView and how to perform record editing in a QDataBrowser. The application demonstrates how to use QDataTables including in-place record editing and how to set up master-detail relationships between QDataTables. In the following text we describe the creation of a 'book' database application. A standard text covering SQL databases is An Introduction to Database Systems (7th ed.) by C. We also assume a basic understanding of the concepts of normalization and of primary and foreign keys. We assume that you have some familiarity with SELECT, INSERT, UPDATE, and DELETE statements. At the time of writing the drivers that Qt supports are QODBC3 (Open Database Connectivity), QOCI8 (Oracle), QPSQL7 (PostgreSQL 6 and 7) and QMYSQ元 (MySQL).Īlthough you can use the Qt data-aware widgets to browse and edit data in SQL databases without having to write any SQL, a basic understanding of SQL is highly recommended. If you wish to run the examples or create your own applications using these widgets you need access to an SQL database and a Qt database driver that can connect to the database. A simple approach to foreign key handling is presented here a more sophisticated approach is shown in the online SQL module documentation. It also shows how to code Master-Detail relationships and Drilldown. It demonstrates INSERT, UPDATE and DELETE in both QDataTables (tables) and QDataBrowsers (forms). This chapter shows you how to use Qt's data-aware widgets from within Qt Designer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |