Last change
on this file since 244 was 2, checked in by Dmitry A. Kuminov, 16 years ago |
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
File size:
646 bytes
|
Line | |
---|
1 | //! [0]
|
---|
2 | QAbstractItemModel *model = index.model();
|
---|
3 | //! [0]
|
---|
4 |
|
---|
5 |
|
---|
6 | //! [1]
|
---|
7 | QModelIndex index = model->index(row, column, ...);
|
---|
8 | //! [1]
|
---|
9 |
|
---|
10 |
|
---|
11 | //! [2]
|
---|
12 | QModelIndex indexA = model->index(0, 0, QModelIndex());
|
---|
13 | QModelIndex indexB = model->index(1, 1, QModelIndex());
|
---|
14 | QModelIndex indexC = model->index(2, 1, QModelIndex());
|
---|
15 | //! [2]
|
---|
16 |
|
---|
17 |
|
---|
18 | //! [3]
|
---|
19 | QModelIndex index = model->index(row, column, parent);
|
---|
20 | //! [3]
|
---|
21 |
|
---|
22 |
|
---|
23 | //! [4]
|
---|
24 | QModelIndex indexA = model->index(0, 0, QModelIndex());
|
---|
25 | QModelIndex indexC = model->index(2, 1, QModelIndex());
|
---|
26 | //! [4]
|
---|
27 |
|
---|
28 |
|
---|
29 | //! [5]
|
---|
30 | QModelIndex indexB = model->index(1, 0, indexA);
|
---|
31 | //! [5]
|
---|
32 |
|
---|
33 |
|
---|
34 | //! [6]
|
---|
35 | QVariant value = model->data(index, role);
|
---|
36 | //! [6]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.