| 359 | } |
| 360 | |
| 361 | void MultiLevelListView::setModel(QAbstractItemModel* model) |
| 362 | { |
| 363 | Q_D(MultiLevelListView); |
| 364 | |
| 365 | d->model = model; |
| 366 | |
| 367 | for (LabeledProxy* proxy : std::as_const(d->proxies)) { |
| 368 | dynamic_cast<QAbstractProxyModel*>(proxy)->setSourceModel(model); |
| 369 | } |
| 370 | |
| 371 | if (model && !d->views.isEmpty()) { |
| 372 | d->views.first()->setCurrentIndex(d->views.first()->model()->index(0, 0)); |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | QTreeView* MultiLevelListView::viewForLevel(int level) const |
| 377 | { |
no test coverage detected