Walkthrough: Operate the Tree in the Qt application

Background

Need to operate the standard tree structure-the file system, assuming that you need to access a fixed path, use Qt to provide a sample application-DirView as the target application for automation.

DirView sample interface

the goal

Automate the tree control in Qt applications, that is, the TreeView control. The way Qt implements the tree control is more like a multi-level table control. The goal of automation is to be able to automatically index to the target path in the DirView application.

In order to achieve this goal, we need to master several operations on the tree control:

  • Select the tree node
  • Expand/collapse of tree nodes
  • Search for nodes that meet the conditions in the tree (analogous list control operation)

Chinese version click here.

results matching ""

    No results matching ""