feed more data to TreeView
1 files changed, 6 insertions(+), 1 deletions(-)

M mainwindow.cpp
M mainwindow.cpp +6 -1
@@ 9,7 9,12 @@ MainWindow::MainWindow(QWidget *parent)
 {
     ui_->setupUi(this);
 
-    auto *model = new QStringListModel({"Foo", "Bar", "Baz"}, this);
+    QStringList list;
+    list.reserve(100);
+    for (int i = 0; i < 100; ++i) {
+        list.append((i % 2 == 0) ? "The quick fox jumps over" : "the lazy dog.");
+    }
+    auto *model = new QStringListModel(list, this);
     ui_->treeView->setModel(model);
     ui_->treeView->setItemDelegateForColumn(0, new QuickItemDelegate(this));
 }