Ignore:
Timestamp:
Nov 7, 2017 8:29:59 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:
3e8dee3
Parents:
6280464
Message:

More Qt5 related fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    r6280464 r412e069e  
    1313from PyQt5 import QtWidgets 
    1414from PyQt5 import QtWebKitWidgets 
     15# Officially QtWebEngineWidgets are the way to display HTML in Qt5, 
     16# but this module isn't ported to PyQt5 yet... 
     17# let's wait. In the meantime no Help. 
     18#from PyQt5 import QtWebEngineWidgets 
    1519 
    1620from sasmodels import generate 
     
    5054DEFAULT_POLYDISP_FUNCTION = 'gaussian' 
    5155 
    52 USING_TWISTED = True 
     56#USING_TWISTED = True 
     57USING_TWISTED = False 
    5358 
    5459class ToolTippedItemModel(QtGui.QStandardItemModel): 
     
    463468        menu = QtWidgets.QMenu() 
    464469        label = QtWidgets.QLabel(msg) 
    465         action = QtGui.QWidgetAction(self) 
     470        action = QtWidgets.QWidgetAction(self) 
    466471        action.setDefaultWidget(label) 
    467472        menu.addAction(action) 
     
    472477        Respond to select Model from list event 
    473478        """ 
    474         model = str(self.cbModel.currentText()) 
     479        model = self.cbModel.currentText() 
    475480 
    476481        # empty combobox forced to be read 
     
    528533        Select Category from list 
    529534        """ 
    530         category = str(self.cbCategory.currentText()) 
     535        category = self.cbCategory.currentText() 
    531536        # Check if the user chose "Choose category entry" 
    532537        if category == CATEGORY_DEFAULT: 
     
    674679            helpfile = "mag_help.html" 
    675680        help_location = tree_location + helpfile 
     681 
     682        content = QtCore.QUrl(help_location) 
    676683        self.helpView.load(QtCore.QUrl(help_location)) 
    677684        self.helpView.show() 
     
    727734            fitter = Fit() 
    728735            data = GuiUtils.dataFromItem(fit_index) 
    729             fitter.set_model(model, fit_id, params_to_fit, data=data, 
     736            try: 
     737                fitter.set_model(model, fit_id, params_to_fit, data=data, 
    730738                             constraints=constraints) 
     739            except ValueError as ex: 
     740                logging.error("Setting model parameters failed with: %s" % ex) 
     741                return 
     742 
    731743            qmin, qmax, _ = self.logic.computeRangeFromData(data) 
    732744            fitter.set_data(data=data, id=fit_id, smearer=smearer, qmin=qmin, 
     
    15131525        residuals_plot.id = "Residual " + residuals_plot.id 
    15141526        self.createNewIndex(residuals_plot) 
    1515         self.communicate.plotUpdateSignal.emit([residuals_plot]) 
     1527        #self.communicate.plotUpdateSignal.emit([residuals_plot]) 
    15161528 
    15171529    def calcException(self, etype, value, tb): 
Note: See TracChangeset for help on using the changeset viewer.