29 Q_PROPERTY(QModelIndex rootIndex READ rootIndex WRITE setRootIndex RESET resetRootIndex NOTIFY rootIndexChanged REVISION(6, 6) FINAL)
30 QML_NAMED_ELEMENT(TreeView)
31 QML_ADDED_IN_VERSION(6, 3)
34 QQuickTreeView(QQuickItem *parent =
nullptr);
35 ~QQuickTreeView() override;
37 QModelIndex rootIndex()
const;
38 void setRootIndex(
const QModelIndex &index);
39 void resetRootIndex();
41 Q_INVOKABLE
int depth(
int row)
const;
43 Q_INVOKABLE
bool isExpanded(
int row)
const;
44 Q_INVOKABLE
void expand(
int row);
45 Q_INVOKABLE
void collapse(
int row);
46 Q_INVOKABLE
void toggleExpanded(
int row);
48 Q_REVISION(6, 4) Q_INVOKABLE
void expandRecursively(
int row = -1,
int depth = -1);
49 Q_REVISION(6, 4) Q_INVOKABLE
void collapseRecursively(
int row = -1);
50 Q_REVISION(6, 4) Q_INVOKABLE
void expandToIndex(
const QModelIndex &index);
52 Q_INVOKABLE QModelIndex modelIndex(
const QPoint &cell)
const override;
53 Q_INVOKABLE QPoint cellAtIndex(
const QModelIndex &index)
const override;
55#if QT_DEPRECATED_SINCE(6
, 4
)
56 QT_DEPRECATED_VERSION_X_6_4(
"Use index(row, column) instead")
57 Q_REVISION(6, 4) Q_INVOKABLE QModelIndex modelIndex(
int row,
int column)
const override;
61 void expanded(
int row,
int depth);
62 void collapsed(
int row,
bool recursively);
63 Q_REVISION(6, 6)
void rootIndexChanged();
66 void keyPressEvent(QKeyEvent *event) override;
69 Q_DISABLE_COPY(QQuickTreeView)
70 Q_DECLARE_PRIVATE(QQuickTreeView)