Ignore:
Timestamp:
Oct 30, 2017 7:50:09 AM (7 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:
304d082
Parents:
99ea1b0
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py

    r99ea1b0 r0849aec  
    22import sys 
    33import os 
    4 from PyQt4 import QtCore 
    5 from PyQt4 import QtGui 
    6 from PyQt4 import QtWebKit 
     4from PyQt5 import QtCore 
     5from PyQt5 import QtGui 
     6from PyQt5 import QtWidgets 
     7from PyQt5 import QtWebKitWidgets 
    78 
    89from twisted.internet import threads 
     
    3536        self._model.appendRow(item) 
    3637 
    37 class InvariantWindow(QtGui.QDialog, Ui_tabbedInvariantUI): 
     38class InvariantWindow(QtWidgets.QDialog, Ui_tabbedInvariantUI): 
    3839    # The controller which is responsible for managing signal slots connections 
    3940    # for the gui and providing an interface to the data model. 
     
    6162        self._model_item = QtGui.QStandardItem() 
    6263 
    63         self._helpView = QtWebKit.QWebView() 
     64        self._helpView = QtWebKitWidgets.QWebView() 
    6465        self.detailsDialog = DetailsDialog(self) 
    6566 
     
    502503    def setupMapper(self): 
    503504        # Set up the mapper. 
    504         self.mapper = QtGui.QDataWidgetMapper(self) 
     505        self.mapper = QtWidgets.QDataWidgetMapper(self) 
    505506        self.mapper.setOrientation(QtCore.Qt.Vertical) 
    506507        self.mapper.setModel(self.model) 
     
    543544        self.mapper.addMapping(self.lineEdit_18, WIDGETS.W_INVARIANT_ERR) 
    544545 
    545         self.mapper.toFirst() 
     546        # FIXME DOESNT WORK WITH QT5 
     547        #self.mapper.toFirst() 
    546548 
    547549    def setData(self, data_item, is_batch=False): 
     
    644646        """ 
    645647        return False 
    646  
    647 if __name__ == "__main__": 
    648     app = QtGui.QApplication([]) 
    649     import qt4reactor 
    650     qt4reactor.install() 
    651     # DO NOT move the following import to the top! 
    652     # (unless you know what you're doing) 
    653     from twisted.internet import reactor 
    654     dlg = InvariantWindow(reactor) 
    655     dlg.show() 
    656     reactor.run() 
Note: See TracChangeset for help on using the changeset viewer.