summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrenda-br2023-02-28 14:07:53 +0530
committerbrenda-br2023-02-28 14:07:53 +0530
commit8aac54fa34d3f4916cf7da2bedefa56cb91d55be (patch)
tree2cdedd7c9fdae6822ae9c7f4cef1574e0026c610
parent7cc33e72b9cd08f41eb8d13a29f013238ca85577 (diff)
downloadChemical-PFD-8aac54fa34d3f4916cf7da2bedefa56cb91d55be.tar.gz
Chemical-PFD-8aac54fa34d3f4916cf7da2bedefa56cb91d55be.tar.bz2
Chemical-PFD-8aac54fa34d3f4916cf7da2bedefa56cb91d55be.zip
Remove Project Title Bar
-rw-r--r--src/main/python/main.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/python/main.py b/src/main/python/main.py
index bf94a5b..5af252d 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -104,12 +104,12 @@ class appWindow(QMainWindow):
#call to create a new file inside mdi area
project = FileWindow(self.mdi)
project.setObjectName("New Project")
+ project.setWindowFlags(Qt.FramelessWindowHint)
self.mdi.addSubWindow(project)
if not project.tabList: # important when unpickling a file instead
project.newDiagram() #create a new tab in the new file
project.fileCloseEvent.connect(self.fileClosed) #closed file signal to switch to sub window view
- if self.count > 0: #switch to tab view if needed
- self.mdi.setViewMode(QMdiArea.TabbedView)
+ self.mdi.setViewMode(QMdiArea.TabbedView)
project.show()
def openProject(self):
@@ -126,9 +126,7 @@ class appWindow(QMainWindow):
project.resizeHandler()
project.fileCloseEvent.connect(self.fileClosed)
project.show()
- if self.count > 1:
- # self.tabSpace.setVisible(True)
- self.mdi.setViewMode(QMdiArea.TabbedView)
+ self.mdi.setViewMode(QMdiArea.TabbedView)
def saveProject(self):
#serialize all files in mdi area
@@ -169,9 +167,10 @@ class appWindow(QMainWindow):
self.writeSettings()
def fileClosed(self, index):
+ pass
#checks if the file tab menu needs to be removed
- if self.count <= 1 :
- self.mdi.setViewMode(QMdiArea.SubWindowView)
+ # if self.count <= 1 :
+ # self.mdi.setViewMode(QMdiArea.SubWindowView)
def writeSettings(self):
# write window state on window close