diff --git a/application/mainwindow.cpp b/application/mainwindow.cpp index 309b4ba..7e20127 100644 --- a/application/mainwindow.cpp +++ b/application/mainwindow.cpp @@ -6,6 +6,8 @@ #include #include +#include +#include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), @@ -57,5 +59,8 @@ void MainWindow::openPlugin() void MainWindow::on_actionOpen_database_triggered() { - Context::instance().openDb("/home/jony/db.db"); + QFileDialog dialog(this); + dialog.setNameFilter(tr("Database Files (*.db)")); + dialog.setWindowTitle(tr("Open Database")); + Context::instance().openDb(dialog.getOpenFileName()); } diff --git a/application/mainwindow.ui b/application/mainwindow.ui index 7b13053..7552bc0 100644 --- a/application/mainwindow.ui +++ b/application/mainwindow.ui @@ -29,18 +29,8 @@ QTabWidget::Rounded - 0 + -1 - - - Tab 1 - - - - - Tab 2 - -