Ignore:
File:
1 edited

Legend:

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

    rd3c0b95 ra3c94b54  
    88from twisted.internet import threads 
    99import numpy as np 
    10 import webbrowser 
    1110 
    1211from PyQt5 import QtCore 
    1312from PyQt5 import QtGui 
    1413from PyQt5 import QtWidgets 
     14from 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 product 
     
    126130 
    127131        # Display HTML content 
    128         #self.setupHelp() 
     132        self.helpView = QtWebKitWidgets.QWebView() 
    129133 
    130134        # New font to display angstrom symbol 
     
    941945        Show the "Fitting" section of help 
    942946        """ 
    943         tree_location = "/user/sasgui/perspectives/fitting/" 
     947        tree_location = GuiUtils.HELP_DIRECTORY_LOCATION + "/user/sasgui/perspectives/fitting/" 
    944948 
    945949        # Actual file will depend on the current tab 
     
    951955            helpfile = "residuals_help.html" 
    952956        elif tab_id == 2: 
    953             helpfile = "resolution.html" 
     957            helpfile = "sm_help.html" 
    954958        elif tab_id == 3: 
    955             helpfile = "pd/polydispersity.html" 
     959            helpfile = "pd_help.html" 
    956960        elif tab_id == 4: 
    957             helpfile = "magnetism/magnetism.html" 
     961            helpfile = "mag_help.html" 
    958962        help_location = tree_location + helpfile 
    959963 
    960         self.showHelp(help_location) 
    961  
    962     def showHelp(self, url): 
    963         """ 
    964         Calls parent's method for opening an HTML page 
    965         """ 
    966         self.parent.showHelp(url) 
     964        content = QtCore.QUrl(help_location) 
     965        self.helpView.load(QtCore.QUrl(help_location)) 
     966        self.helpView.show() 
    967967 
    968968    def onDisplayMagneticAngles(self): 
Note: See TracChangeset for help on using the changeset viewer.