Ignore:
Timestamp:
Nov 9, 2017 8:43:07 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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)
Message:

Initial, in-progress version. Not really working atm. SASVIEW-787

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/MainWindow.py

    • Property mode changed from 100755 to 100644
    rb3e8629 r4992ff2  
    11# UNLESS EXEPTIONALLY REQUIRED TRY TO AVOID IMPORTING ANY MODULES HERE 
    22# ESPECIALLY ANYTHING IN SAS, SASMODELS NAMESPACE 
    3 from PyQt4 import QtGui 
     3#from PyQt4 import QtGui 
     4from PyQt5.QtWidgets import * 
     5from PyQt5.QtGui import * 
    46 
    57# Local UI 
     
    1012import sas.qtgui.Utilities.SasviewLogger 
    1113 
    12 class MainSasViewWindow(QtGui.QMainWindow, Ui_MainWindow): 
     14class MainSasViewWindow(QMainWindow, Ui_MainWindow): 
    1315    # Main window of the application 
    1416    def __init__(self, parent=None): 
     
    1719 
    1820        # define workspace for dialogs. 
    19         self.workspace = QtGui.QWorkspace(self) 
     21        self.workspace = QMdiArea(self) 
    2022        self.setCentralWidget(self.workspace) 
    2123 
    2224        # Create the gui manager 
    2325        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) 
    2530 
    2631    def closeEvent(self, event): 
     
    3742    """ 
    3843    # TODO: standardize path to images 
    39     pixmap = QtGui.QPixmap("src/sas/qtgui/images/SVwelcome_mini.png") 
    40     splashScreen = QtGui.QSplashScreen(pixmap) 
     44    pixmap = QPixmap("src/sas/qtgui/images/SVwelcome_mini.png") 
     45    splashScreen = QSplashScreen(pixmap) 
    4146    return splashScreen 
    4247 
    4348def run(): 
    44     app = QtGui.QApplication([]) 
     49    app = QApplication([]) 
    4550 
    4651    # Main must have reference to the splash screen, so making it explicit 
     
    5560    # DO NOT move the following import to the top! 
    5661    # (unless you know what you're doing) 
    57     import qt4reactor 
     62    import qt5reactor 
    5863    # Using the Qt4 reactor wrapper from https://github.com/ghtdak/qtreactor 
    59     qt4reactor.install() 
     64    qt5reactor.install() 
    6065 
    6166    # DO NOT move the following import to the top! 
Note: See TracChangeset for help on using the changeset viewer.