# HG changeset patch # User Yuya Nishihara # Date 1579270139 -32400 # Fri Jan 17 23:08:59 2020 +0900 # Node ID 1b47d15757f00324a33c2748ac4ba42cd99f8669 # Parent d1e9edf3399c55b950b0980830fbe92b8c46e535 add TreeView and dummy model diff --git a/mainwindow.cpp b/mainwindow.cpp --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,3 +1,4 @@ +#include #include "mainwindow.h" #include "./ui_mainwindow.h" @@ -6,6 +7,9 @@ , ui(new Ui::MainWindow) { ui->setupUi(this); + + auto *model = new QStringListModel({"Foo", "Bar", "Baz"}, this); + ui->treeView->setModel(model); } MainWindow::~MainWindow() diff --git a/mainwindow.ui b/mainwindow.ui --- a/mainwindow.ui +++ b/mainwindow.ui @@ -13,8 +13,36 @@ MainWindow - - + + + + + + false + + + true + + + false + + + true + + + + + + + + + 0 + 0 + 800 + 22 + + +