From e82d0a5dd2859b4f108cc2381a5f3fbcf17ccd78 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 20 May 2017 15:47:05 +1200 Subject: [PATCH] add top-level db items to ui --- qbolt/mainwindow.cpp | 5 +++++ qbolt/resources.qrc | 1 + 2 files changed, 6 insertions(+) diff --git a/qbolt/mainwindow.cpp b/qbolt/mainwindow.cpp index 95a79ec..be9cfef 100644 --- a/qbolt/mainwindow.cpp +++ b/qbolt/mainwindow.cpp @@ -36,6 +36,11 @@ void MainWindow::on_actionOpen_database_triggered() return; } + QTreeWidgetItem *top = new QTreeWidgetItem(); + top->setText(0, QFileInfo(file).completeBaseName()); + top->setIcon(0, QIcon(":/rsrc/database.png")); + ui->bucketTree->addTopLevelItem(top); + // Free delete bdb; } diff --git a/qbolt/resources.qrc b/qbolt/resources.qrc index cdeb017..3cc2483 100644 --- a/qbolt/resources.qrc +++ b/qbolt/resources.qrc @@ -4,5 +4,6 @@ rsrc/table.png rsrc/information.png rsrc/database_lightning.png + rsrc/database.png