Qt Getting Started Tutorial: Advanced Controls - QTreeWidget Tree Widget
QTreeWidget is a convenience class that provides a standard tree widget with a classic item-based interface similar to that used by the QListView class in Qt 3. This article will introduce how to use QTreeWidget to create a tree structure, add children and parents, and how to implement some common functions through the signal and slot mechanism.
Create QTreeWidget
The following code shows how to create a simple QTreeWidget:
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QTreeWidget, QTreeWidgetItem
class MainWindow(QMainWindow):
def __init__