Changeset 4992ff2 in sasview for src/sas/qtgui/MainWindow/MainWindow.py
- Timestamp:
- Nov 9, 2017 8:43:07 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 7969b9c
- Parents:
- 7fb471d
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/30/17 07:50:09)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/MainWindow.py
- Property mode changed from 100755 to 100644
rb3e8629 r4992ff2 1 1 # UNLESS EXEPTIONALLY REQUIRED TRY TO AVOID IMPORTING ANY MODULES HERE 2 2 # ESPECIALLY ANYTHING IN SAS, SASMODELS NAMESPACE 3 from PyQt4 import QtGui 3 #from PyQt4 import QtGui 4 from PyQt5.QtWidgets import * 5 from PyQt5.QtGui import * 4 6 5 7 # Local UI … … 10 12 import sas.qtgui.Utilities.SasviewLogger 11 13 12 class MainSasViewWindow(Q tGui.QMainWindow, Ui_MainWindow):14 class MainSasViewWindow(QMainWindow, Ui_MainWindow): 13 15 # Main window of the application 14 16 def __init__(self, parent=None): … … 17 19 18 20 # define workspace for dialogs. 19 self.workspace = Q tGui.QWorkspace(self)21 self.workspace = QMdiArea(self) 20 22 self.setCentralWidget(self.workspace) 21 23 22 24 # Create the gui manager 23 25 from .GuiManager import GuiManager 24 self.guiManager = GuiManager(self) 26 try: 27 self.guiManager = GuiManager(self) 28 except Exception as ex: 29 print("EXCEPTION: ", ex) 25 30 26 31 def closeEvent(self, event): … … 37 42 """ 38 43 # TODO: standardize path to images 39 pixmap = Q tGui.QPixmap("src/sas/qtgui/images/SVwelcome_mini.png")40 splashScreen = Q tGui.QSplashScreen(pixmap)44 pixmap = QPixmap("src/sas/qtgui/images/SVwelcome_mini.png") 45 splashScreen = QSplashScreen(pixmap) 41 46 return splashScreen 42 47 43 48 def run(): 44 app = Q tGui.QApplication([])49 app = QApplication([]) 45 50 46 51 # Main must have reference to the splash screen, so making it explicit … … 55 60 # DO NOT move the following import to the top! 56 61 # (unless you know what you're doing) 57 import qt 4reactor62 import qt5reactor 58 63 # Using the Qt4 reactor wrapper from https://github.com/ghtdak/qtreactor 59 qt 4reactor.install()64 qt5reactor.install() 60 65 61 66 # DO NOT move the following import to the top!
Note: See TracChangeset
for help on using the changeset viewer.