diff --git a/src/interface_qt.cpp b/src/interface_qt.cpp
index b5066e7..c99a8d3 100644
--- a/src/interface_qt.cpp
+++ b/src/interface_qt.cpp
@@ -300,6 +300,22 @@ void DialogAdd::accept()
delete this;
}
+void DialogAdd::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasFormat("text/plain"))
+ {
+ event->acceptProposedAction();
+ }
+}
+
+void DialogAdd::dropEvent(QDropEvent *event)
+{
+ const QString text = event->mimeData()->text();
+ QListWidgetItem *item = new QListWidgetItem(text);
+ item->setFlags(item->flags() | Qt::ItemIsEditable);
+ list_receipts->insertItem(list_receipts->count(), item);
+}
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/src/interface_qt.hpp b/src/interface_qt.hpp
index 011afde..9dd69ca 100644
--- a/src/interface_qt.hpp
+++ b/src/interface_qt.hpp
@@ -73,6 +73,8 @@ public:
private:
const Dialogdata get_data() const;
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dropEvent(QDropEvent *event);
MainWindow *_parent;
diff --git a/src/whyblocked_add.ui b/src/whyblocked_add.ui
index fdb9017..bf882c1 100644
--- a/src/whyblocked_add.ui
+++ b/src/whyblocked_add.ui
@@ -10,6 +10,9 @@
300
+
+ true
+
Add entry
diff --git a/translations/whyblocked_de.ts b/translations/whyblocked_de.ts
index 27809f9..e83b12d 100644
--- a/translations/whyblocked_de.ts
+++ b/translations/whyblocked_de.ts
@@ -4,62 +4,62 @@
DialogAdd
-
+
Eintrag hinzufügen
-
+
Gedächtnisstützen, Beweise
-
+
Be&lege
-
+
Beleg hinzufügen
-
+
&Hinzufügen
-
+
&Blockiert
-
+
&Gedämpft
-
+
B&egründung
-
+
Blockiert/Gedämpft
-
+
Ben&utzer/Instanz
-
+
Beleg entfernen
-
+
Ent&fernen
diff --git a/translations/whyblocked_en.ts b/translations/whyblocked_en.ts
index a52ce8c..2eb0787 100644
--- a/translations/whyblocked_en.ts
+++ b/translations/whyblocked_en.ts
@@ -4,62 +4,62 @@
DialogAdd
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+