aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/snippets/qml/treeview
Commit message (Collapse)AuthorAgeFilesLines
* TreeViewDelegate: hasChildren should be bool, not intRichard Moe Gustavsen2025-01-091-1/+1
| | | | | | | | | The documentation and the manual test declares 'hasChildren' as 'int'. It should be 'bool'. Pick-to: 6.9 6.8 Change-Id: Ied8c66f3758e759b5803cf0e08135555644747b8 Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
* Correct doc snippet licenseLucie Gérard2024-03-221-1/+1
| | | | | | | | | | | | | | All file under doc/snippet should be license as Documentation snippets and according to QUIP-18 [1] thi is LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 6.7.0 Task-number: QTBUG-121787 Change-Id: Iee9bc9b8c2a81695c5825a36768b36db2726bd35 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* TreeView: document how to implement expanding indicatorsRichard Moe Gustavsen2023-11-271-18/+51
| | | | | | | | | | | | | | | | | | | | Being able to rotate the expanded/collapsed indicator in a TreeView is assumed to be a normal request. But it's not very intuitive to implement, since TreeView will do a relayout when you expand or collapse a node, which will cause existing delegates to be reused. If a delegate has an ongoing animations at this point, it will look weird. In order to solve that, you need to use the TableView.onPooled/onReused signals, which is not intuitive. Until (and if) we have have a more explicit API to support this, at least show in the documented example how it can be done. Pick-to: 6.6 6.5 Change-Id: Ibf08fd8518d74ba12a4a6f7db71f3f56a8970fac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* doc: TreeView and delegate doc and warning improvementsShawn Rutledge2022-04-051-6/+8
| | | | | | | | | | | | | | | - a delegate Item is not "root"; that ID could clash with the user's root item when copy-pasting code - choose "▸" triangle character because it looks better with some fonts (such as the default font on Linux in Qt Quick, Assistant and even gitk); rotate it when the tree is expanded rather than risking a mismatched rotated triangle character - fix singular form in phrase "only accepts a model of type..." - Shorten phrase "An example of how a custom delegate could look like" Pick-to: 6.3 Change-Id: Ic91f07be4b79a88c8532d4e2e49914fbdc529e36 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* quick: add qquicktreeviewRichard Moe Gustavsen2021-12-041-0/+90
This patch adds TreeView to Qt Quick. It is more or less a copy from the TreeView in Marketplace, but with some modifications to make it more equal to the already existing TableView, ListView, and GridView. [ChangeLog][Item Views] A new view is added: TreeView Fixes: QTBUG-61630 Change-Id: Ibb9d22cf9c9df021e77d03287872134c2682682a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>