Skip to content

Conversation

@corranwebster
Copy link
Contributor

@corranwebster corranwebster commented Jan 23, 2026

Implement the Qt Tree widget.

Fairly straightforward other than the complexities of the QAbstractItemModel for a tree. We store references to node objects on the QModelIndex objects to avoid having to walk up and down the tree constantly.

For the widget warning check, Qt doesn't know whether a cell contains a widget or not until it is actually visible, so the warning gets issued on expanding the rows, not on display of the table and we needed to adjust the tests slightly to accomodate this.

Like the Table, we have with evenly-spaced non-changable column widths for now (see #4109).

Includes a fix of #4111 since I needed that for manual testing. It also includes a fix to a couple of fixtures which should have been async.

Ref #3914.
Fixes #4111.

To Do:

  • screenshot
  • issues with tests which reparent widget.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@corranwebster corranwebster mentioned this pull request Jan 23, 2026
37 tasks
@corranwebster corranwebster marked this pull request as ready for review January 24, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tree example doesn't parent items correctly

1 participant