1QSqlSelectCursor(3qt) QSqlSelectCursor(3qt)
2
3
4
6 QSqlSelectCursor - Browsing of general SQL SELECT statements
7
9 #include <qsqlselectcursor.h>
10
11 Inherits QSqlCursor.
12
13 Public Members
14 QSqlSelectCursor ( const QString & query = QString::null, QSqlDatabase
15 * db = 0 )
16 QSqlSelectCursor ( const QSqlSelectCursor & other )
17 ~QSqlSelectCursor ()
18
20 The QSqlSelectCursor class provides browsing of general SQL SELECT
21 statements.
22
23 QSqlSelectCursor is a convenience class that makes it possible to
24 display result sets from general SQL SELECT statements in data-aware Qt
25 widgets. QSqlSelectCursor is read-only and does not support INSERT,
26 UPDATE or DELETE operations.
27
28 Pass the query in at construction time, or use the
29 QSqlSelectCursor::exec() function.
30
31 Example:
32
33 ...
34 QSqlSelectCursor* cur = new QSqlSelectCursor( "SELECT id, firstname, lastname FROM author" );
35 QDataTable* table = new QDataTable( this );
36 table->setSqlCursor( cur, TRUE, TRUE );
37 table->refresh();
38 ...
39 cur->exec( "SELECT * FROM books" );
40 table->refresh();
41 ...
42
43 See also Database Classes.
44
47 QSqlDatabase * db = 0 )
48 Constructs a read only cursor on database db using the query query.
49
51 Constructs a copy of other
52
54 Destroys the object and frees any allocated resources
55
56
58 http://doc.trolltech.com/qsqlselectcursor.html
59 http://www.trolltech.com/faq/tech.html
60
62 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
63 license file included in the distribution for a complete license
64 statement.
65
67 Generated automatically from the source code.
68
70 If you find a bug in Qt, please report it as described in
71 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
72 help you. Thank you.
73
74 The definitive Qt documentation is provided in HTML format; it is
75 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
76 web browser. This man page is provided as a convenience for those users
77 who prefer man pages, although this format is not officially supported
78 by Trolltech.
79
80 If you find errors in this manual page, please report them to qt-
81 bugs@trolltech.com. Please include the name of the manual page
82 (qsqlselectcursor.3qt) and the Qt version (3.3.8).
83
84
85
86Trolltech AS 2 February 2007 QSqlSelectCursor(3qt)