Fixed some focus and activation bugs
[mdictionary] / src / mdictionary / gui / HistoryListDialog.cpp
index a9d4765..7e58372 100644 (file)
@@ -53,7 +53,7 @@ HistoryListDialog::HistoryListDialog(QStringList words, QWidget *parent):
 
      setMinimumHeight(300);
 
-     connect(historyListWidget, SIGNAL(clicked(QModelIndex)),
+     connect(historyListWidget, SIGNAL(activated(QModelIndex)),
              this, SLOT(itemClicked(QModelIndex)));
 }
 
@@ -72,3 +72,8 @@ QString HistoryListDialog::selectedWord() {
 int HistoryListDialog::selectedRow() {
     return _selectedRow;
 }
+
+int HistoryListDialog::exec() {
+    historyListWidget->setFocus();
+    QDialog::exec();
+}