aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/PlainTextEditorPage.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-11-24 20:17:43 +0000
committersaturneric <[email protected]>2024-11-24 20:17:43 +0000
commitb4e556d834a0c1e1cedbbda0a91cd892f9105d20 (patch)
tree6fe99ac300a8643daa7177b8f83820acb097f9aa /src/ui/widgets/PlainTextEditorPage.cpp
parentfix: solve key list drag and drop refreshing issue (diff)
downloadGpgFrontend-b4e556d834a0c1e1cedbbda0a91cd892f9105d20.tar.gz
GpgFrontend-b4e556d834a0c1e1cedbbda0a91cd892f9105d20.zip
feat: allow drag and drop to open text file
Diffstat (limited to 'src/ui/widgets/PlainTextEditorPage.cpp')
-rw-r--r--src/ui/widgets/PlainTextEditorPage.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/widgets/PlainTextEditorPage.cpp b/src/ui/widgets/PlainTextEditorPage.cpp
index 6e92b5b6..bd1c9837 100644
--- a/src/ui/widgets/PlainTextEditorPage.cpp
+++ b/src/ui/widgets/PlainTextEditorPage.cpp
@@ -54,6 +54,9 @@ PlainTextEditorPage::PlainTextEditorPage(QString file_path, QWidget *parent)
this->ui_->characterLabel->setText(tr("0 character"));
this->ui_->lfLabel->setHidden(true);
this->ui_->encodingLabel->setText("Unicode");
+ this->ui_->textPage->setAcceptDrops(false);
+
+ setAcceptDrops(false);
connect(ui_->textPage, &QPlainTextEdit::textChanged, this, [=]() {
// if file is loading