An Introduction to Model/View Programming, Адаптация перевода |
Здравствуйте, гость ( Вход | Регистрация )
An Introduction to Model/View Programming, Адаптация перевода |
Admin |
10.12.2007, 13:05
Сообщение
#1
|
Администратор Группа: Администратор Сообщений: 646 Регистрация: 9.10.2007 Из: crossplatform.ru Пользователь №: 1 Спасибо сказали: 17 раз(а) Репутация: 2 |
An Introduction to Model/View Programming
http://crossplatform.ru/documentation/qtdo...ion.php#sorting Сделано, кроме: Цитата There are two ways of approaching sorting in the model/view architecture; which approach to choose depends on your underlying model. If your model is sortable, i.e, if it reimplements the QAbstractItemModel::sort() function, both QTableView and QTreeView provide an API that allows you to sort your model data programmatically. In addition, you can enable interactive sorting (i.e. allowing the users to sort the data by clicking the view's headers), by connecting the QHeaderView::sectionClicked() signal to the QTableView::sortByColumn() slot or the QTreeView::sortByColumn() slot, respectively. The alternative approach, if your model do not have the required interface or if you want to use a list view to present your data, is to use a proxy model to transform the structure of your model before presenting the data in the view. This is covered in detail in the section on Proxy Models. и Цитата If you wish to take advantage of the features provided by the model/view approach while still using an item-based interface, consider using view classes, such as QListView, QTableView, and QTreeView with QStandardItemModel.
|
|
|
Admin |
12.12.2007, 9:45
Сообщение
#2
|
Администратор Группа: Администратор Сообщений: 646 Регистрация: 9.10.2007 Из: crossplatform.ru Пользователь №: 1 Спасибо сказали: 17 раз(а) Репутация: 2 |
Сделано.
|
|
|
Текстовая версия | Сейчас: 22.12.2024, 14:05 |