diff options
author | Jonathan Klimt <brouwer@annejan.com> | 2015-12-17 15:21:30 +0100 |
---|---|---|
committer | Jonathan Klimt <jounathaen@mail.de> | 2015-12-17 15:21:30 +0100 |
commit | e4c4ddab067a7e108035244bc143a76631713da2 (patch) | |
tree | 6f28b013a2addc2e86d8645433976d44cbc8a957 | |
parent | 480010a5b5fafd80df15ca11ea0e4c78ee4b04ca (diff) |
When doubleclick on treeview Item open change Dialouge
-rw-r--r-- | mainwindow.cpp | 16 | ||||
-rw-r--r-- | mainwindow.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 8205209e..5b1dc2af 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -592,6 +592,22 @@ void MainWindow::on_treeView_clicked(const QModelIndex &index) { } /** + * @brief MainWindow::on_treeView_doubleClicked + * @param index + */ +void MainWindow::on_treeView_doubleClicked(const QModelIndex &index) { + QString file = getFile(index, usePass); + if (file.isEmpty()) { + QMessageBox::critical( + this, tr("Can not edit"), + tr("Selected password file does not exist, not able to edit")); + return; + } + setPassword(file, true, false); +} + + +/** * @brief MainWindow::executePass * @param args */ diff --git a/mainwindow.h b/mainwindow.h index 8afb9ff9..94303dfc 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -63,6 +63,7 @@ class MainWindow : public QMainWindow { void on_updateButton_clicked(); void on_pushButton_clicked(); void on_treeView_clicked(const QModelIndex &index); + void on_treeView_doubleClicked(const QModelIndex &index); void on_configButton_clicked(); void readyRead(bool finished); void processFinished(int, QProcess::ExitStatus); |