From 6b5d8c6629b069e28937e439da11ea5638e7e1df Mon Sep 17 00:00:00 2001 From: AMMAN Date: Tue, 27 Dec 2022 21:45:27 +0530 Subject: [PATCH] Document folder made Read Only --- FrameWorkCode/mainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/FrameWorkCode/mainwindow.cpp b/FrameWorkCode/mainwindow.cpp index 8406c34f..6a83f6b4 100644 --- a/FrameWorkCode/mainwindow.cpp +++ b/FrameWorkCode/mainwindow.cpp @@ -6527,6 +6527,14 @@ void MainWindow::LoadDocument(QFile * f, QString ext, QString name) } } } + + QString x=finfo.fileName(); + if(x.contains("txt")){ + curr_browser->setReadOnly(true); + } + else{ + curr_browser->setReadonly(false); + } // Deleting temporarily created CustomTextBrowser delete b;