mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-02 07:15:27 +08:00
6.5.3 clean
This commit is contained in:
@ -89,6 +89,7 @@ BookWindow::BookWindow()
|
||||
);
|
||||
|
||||
ui.bookTable->setCurrentIndex(model->index(0, 0));
|
||||
ui.bookTable->selectRow(0);
|
||||
createMenuBar();
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ private slots:
|
||||
private:
|
||||
void showError(const QSqlError &err);
|
||||
Ui::BookWindow ui;
|
||||
QSqlRelationalTableModel *model;
|
||||
int authorIdx, genreIdx;
|
||||
QSqlRelationalTableModel *model = nullptr;
|
||||
int authorIdx = 0, genreIdx = 0;
|
||||
|
||||
void createMenuBar();
|
||||
};
|
||||
|
@ -64,6 +64,9 @@
|
||||
<string>Details</string>
|
||||
</property>
|
||||
<layout class="QFormLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
Q_INIT_RESOURCE(books);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
BookWindow win;
|
||||
|
@ -5,6 +5,7 @@
|
||||
\example books
|
||||
\title Books
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
\brief Shows how to use Qt SQL classes with a model/view framework.
|
||||
|
||||
The Books example shows how Qt's SQL classes can be used with the model/view
|
||||
|
@ -3,8 +3,9 @@
|
||||
|
||||
/*!
|
||||
\example cachedtable
|
||||
\title Cached Table Example
|
||||
\title Cached SQL Table
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
|
||||
\brief The Cached Table example shows how a table view can be used to access a database,
|
||||
caching any changes to the data until the user explicitly submits them using a
|
||||
|
@ -5,6 +5,7 @@
|
||||
\example drilldown
|
||||
\title Drill Down Example
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
|
||||
\brief The Drill Down example shows how to read data from a database as
|
||||
well as submit changes, using the QSqlRelationalTableModel and
|
||||
|
@ -5,6 +5,7 @@
|
||||
\example masterdetail
|
||||
\title Master Detail Example
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
|
||||
\brief The Master Detail Example shows how to present data from different
|
||||
data sources in the same application. The album titles, and the
|
||||
|
@ -5,6 +5,7 @@
|
||||
\example querymodel
|
||||
\title Query Model Example
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
|
||||
\brief The Query Model example shows how to make customized versions of
|
||||
data obtained from a SQL query, using a model that encapsulates
|
||||
|
@ -5,6 +5,7 @@
|
||||
\example relationaltablemodel
|
||||
\title Relational Table Model Example
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
|
||||
\brief The Relational Table Model example shows how to use table views with a relational
|
||||
model to visualize the relations between items in a database.
|
||||
|
@ -5,6 +5,7 @@
|
||||
\example sqlbrowser
|
||||
\title SQL Browser
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
|
||||
\brief The SQL Browser example shows how a data browser can be used to visualize
|
||||
the results of SQL statements on a live database.
|
||||
|
@ -5,6 +5,7 @@
|
||||
\example sqlwidgetmapper
|
||||
\title SQL Widget Mapper Example
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
|
||||
\brief The SQL Widget Mapper example shows how to use a map information from a
|
||||
database to widgets on a form.
|
||||
@ -101,8 +102,7 @@
|
||||
As a result, the user is able to select an item from the combo box,
|
||||
and the associated value is written back to the model.
|
||||
|
||||
The rest of the constructor is very similar to that of the
|
||||
\l{Simple Widget Mapper Example}:
|
||||
The rest of the constructor sets up connections and layouts:
|
||||
|
||||
\snippet sqlwidgetmapper/window.cpp Set up connections and layouts
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
\example tablemodel
|
||||
\title Table Model Example
|
||||
\ingroup sql_examples
|
||||
\examplecategory {Data Processing & I/O}
|
||||
|
||||
\brief The Table Model example shows how to use a specialized SQL table model with table
|
||||
views to edit information in a database.
|
||||
|
@ -11,8 +11,6 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Q_INIT_RESOURCE(drilldown);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
if (!createConnection())
|
||||
|
@ -11,8 +11,6 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Q_INIT_RESOURCE(masterdetail);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
if (!createConnection())
|
||||
|
Reference in New Issue
Block a user