Index: src/sas/qtgui/Calculators/DataOperationUtilityPanel.py
===================================================================
--- src/sas/qtgui/Calculators/DataOperationUtilityPanel.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Calculators/DataOperationUtilityPanel.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -140,7 +140,8 @@
             data1 = self.data1
             data2 = self.data2
-            exec("output = data1 %s data2" % operator)
-        except:
-            raise
+            output = eval("data1 %s data2" % operator)
+        except Exception as ex:
+            logging.error(ex)
+            return
 
         self.output = output
Index: src/sas/qtgui/Calculators/DensityPanel.py
===================================================================
--- src/sas/qtgui/Calculators/DensityPanel.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Calculators/DensityPanel.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -60,5 +60,5 @@
 
         # set validators
-        self.ui.editMolecularFormula.setValidator(FormulaValidator(self.ui.editMolecularFormula))
+        #self.ui.editMolecularFormula.setValidator(FormulaValidator(self.ui.editMolecularFormula))
 
         rx = QtCore.QRegExp("[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?")
@@ -94,6 +94,5 @@
         self.mapper.addMapping(self.ui.editMassDensity     , MODEL.MASS_DENSITY)
 
-        # FIXME DOESNT WORK WITH QT5
-        #self.mapper.toFirst()
+        self.mapper.toFirst()
 
     def dataChanged(self, top, bottom):
@@ -140,5 +139,4 @@
 
     def modelReset(self):
-        #self.model.beginResetModel()
         try:
             self.setMode(None)
@@ -148,5 +146,4 @@
         finally:
             pass
-            #self.model.endResetModel()
 
     def displayHelp(self):
Index: src/sas/qtgui/Calculators/GenericScatteringCalculator.py
===================================================================
--- src/sas/qtgui/Calculators/GenericScatteringCalculator.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Calculators/GenericScatteringCalculator.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -135,5 +135,5 @@
                                           "SLD files (*.SLD *.sld);;PDB files (*.pdb *.PDB);; "
                                           "OMF files (*.OMF *.omf);; "
-                                          "All files (*.*)")
+                                          "All files (*.*)")[0]
             if self.datafile:
                 self.default_shape = str(self.cbShape.currentText())
Index: src/sas/qtgui/Calculators/KiessigPanel.py
===================================================================
--- src/sas/qtgui/Calculators/KiessigPanel.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Calculators/KiessigPanel.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -55,6 +55,11 @@
             self.thickness.set_deltaq(dq=float(self.deltaq_in.text()))
             kiessing_result = self.thickness.compute_thickness()
-            float_as_str = "{:.3f}".format(kiessing_result)
-            self.lengthscale_out.setText(float_as_str)
+            if kiessing_result:
+                float_as_str = "{:.3f}".format(kiessing_result)
+                self.lengthscale_out.setText(float_as_str)
+            else:
+                # error or division by zero
+                self.lengthscale_out.setText("")
+
         except (ArithmeticError, ValueError):
             self.lengthscale_out.setText("")
Index: src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py
===================================================================
--- src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -317,7 +317,7 @@
         if self.cbCustomSpectrum.currentText() == 'Add New':
             datafile = QtWidgets.QFileDialog.getOpenFileName(
-                self, "Choose a spectral distribution file", "",
-                "All files (*.*)",
-                QtWidgets.QFileDialog.DontUseNativeDialog)
+                self, "Choose a spectral distribution file","",
+                "All files (*.*)", None,
+                QtWidgets.QFileDialog.DontUseNativeDialog)[0]
 
             if datafile is None or str(datafile) == '':
@@ -568,10 +568,8 @@
         : return: image (numpy array)
         """
-        # This fails in py3 with
-        # [Failure instance: Traceback: <class 'TypeError'>: 'map' object is not subscriptable
-        # INVESTIGATE
-        image = map(func, qx, qy,
+        image = list(map(func, qx, qy,
                     qx_min, qx_max,
-                    qy_min, qy_max)[0]
+                    qy_min, qy_max))[0]
+
         return image
 
@@ -751,4 +749,5 @@
         self.plotter.plot()
         self.plotter.show()
+        self.plotter.update()
 
     def drawLines(self):
Index: src/sas/qtgui/Calculators/SldPanel.py
===================================================================
--- src/sas/qtgui/Calculators/SldPanel.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Calculators/SldPanel.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -128,5 +128,6 @@
 
         # set validators
-        self.ui.editMolecularFormula.setValidator(GuiUtils.FormulaValidator(self.ui.editMolecularFormula))
+        # TODO: GuiUtils.FormulaValidator() crashes with Qt5 - fix
+        #self.ui.editMolecularFormula.setValidator(GuiUtils.FormulaValidator(self.ui.editMolecularFormula))
 
         rx = QtCore.QRegExp("[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?")
@@ -148,8 +149,4 @@
 
         self.model.dataChanged.connect(self.dataChanged)
-        #QtCore.QObject.connect(
-        #    self.model,
-        #    QtCore.SIGNAL("dataChanged(QModelIndex,QModelIndex)"),
-        #    self.dataChanged)
 
         self.modelReset()
@@ -166,6 +163,5 @@
             self.mapper.addMapping(edit, key)
 
-        # FIXME DOESNT WORK WITH QT5
-        #self.mapper.toFirst()
+        self.mapper.toFirst()
 
     def dataChanged(self, top, bottom):
@@ -216,5 +212,5 @@
         finally:
             pass
-            #self.model.endResetModel()
+        #self.model.endResetModel()
 
     def displayHelp(self):
Index: src/sas/qtgui/Calculators/SlitSizeCalculator.py
===================================================================
--- src/sas/qtgui/Calculators/SlitSizeCalculator.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Calculators/SlitSizeCalculator.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -4,4 +4,5 @@
 import os
 import sys
+import logging
 
 from PyQt5 import QtCore
@@ -64,5 +65,10 @@
             return
         loader = Loader()
-        data = loader.load(path_str)[0]
+        try:
+            data = loader.load(path_str)[0]
+        # Can return multiple exceptions - gather them all under one umbrella and complain
+        except Exception as ex:
+            logging.error(ex)
+            return
 
         self.data_file.setText(os.path.basename(path_str))
@@ -79,9 +85,5 @@
                                                  "SAXSess 1D data (*.txt *.TXT *.dat *.DAT)",
                                                  None,
-                                                 QtWidgets.QFileDialog.DontUseNativeDialog)
-
-        if path is None:
-            return
-
+                                                 QtWidgets.QFileDialog.DontUseNativeDialog)[0]
         return path
 
@@ -106,10 +108,12 @@
             self.clearResults()
             msg = "ERROR: Data hasn't been loaded correctly"
-            raise RuntimeError(msg)
+            logging.error(msg)
+            return
 
         if data.__class__.__name__ == 'Data2D':
             self.clearResults()
             msg = "Slit Length cannot be computed for 2D Data"
-            raise RuntimeError(msg)
+            logging.error(msg)
+            return
 
         #compute the slit size
@@ -119,5 +123,6 @@
             if xdata == [] or xdata is None or ydata == [] or ydata is None:
                 msg = "The current data is empty please check x and y"
-                raise ValueError(msg)
+                logging.error(msg)
+                return
             slit_length_calculator = SlitlengthCalculator()
             slit_length_calculator.set_data(x=xdata, y=ydata)
@@ -126,5 +131,6 @@
             self.clearResults()
             msg = "Slit Size Calculator: %s" % (sys.exc_info()[1])
-            raise RuntimeError(msg)
+            logging.error(msg)
+            return
 
         slit_length_str = "{:.5f}".format(slit_length)
Index: src/sas/qtgui/MainWindow/DataExplorer.py
===================================================================
--- src/sas/qtgui/MainWindow/DataExplorer.py	(revision 304d082fdf2d11b8729c78132d385223c5c29054)
+++ src/sas/qtgui/MainWindow/DataExplorer.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -218,5 +218,5 @@
             'options'   : QtWidgets.QFileDialog.DontUseNativeDialog
         }
-        filename = str(QtWidgets.QFileDialog.getOpenFileName(**kwargs))
+        filename = QtWidgets.QFileDialog.getOpenFileName(**kwargs)[0]
         if filename:
             load_thread = threads.deferToThread(self.readProject, filename)
@@ -582,4 +582,5 @@
         # Show the plot
         new_plot.show()
+        new_plot.canvas.draw()
 
         # Update the active chart list
@@ -628,6 +629,5 @@
         paths = QtWidgets.QFileDialog.getOpenFileNames(self, "Choose a file", "",
                 wlist, None, QtWidgets.QFileDialog.DontUseNativeDialog)[0]
-        # [0] is new in Qt5 as getOpenFileNames() returns now a tuple!
-        if paths is None:
+        if not paths:
             return
 
Index: src/sas/qtgui/MainWindow/GuiManager.py
===================================================================
--- src/sas/qtgui/MainWindow/GuiManager.py	(revision 304d082fdf2d11b8729c78132d385223c5c29054)
+++ src/sas/qtgui/MainWindow/GuiManager.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -8,5 +8,5 @@
 from PyQt5.QtWidgets import *
 from PyQt5.QtGui import *
-from PyQt5.QtCore import Qt
+from PyQt5.QtCore import Qt, QLocale
 from PyQt5.QtWebKitWidgets import QWebView
 
@@ -191,9 +191,9 @@
 
         # Resize to the workspace height
-        #workspace_height = self._workspace.workspace.sizeHint().height()
-        #perspective_size = self._current_perspective.sizeHint()
+        workspace_height = self._workspace.workspace.sizeHint().height()
+        perspective_size = self._current_perspective.sizeHint()
         #if workspace_height < perspective_size.height():
-        #    perspective_width = perspective_size.width()
-        #    self._current_perspective.resize(perspective_width, workspace_height-10)
+        perspective_width = perspective_size.width()
+        self._current_perspective.resize(perspective_width, workspace_height-10)
 
         self._current_perspective.show()
@@ -584,5 +584,5 @@
         self.ipDockWidget.setObjectName("IPythonDockWidget")
         self.ipDockWidget.setWidget(terminal)
-        self._workspace.workspace.addSubWindow(self.ipDockWidget, Qt.RightDockWidgetArea)
+        self._workspace.addDockWidget(Qt.RightDockWidgetArea, self.ipDockWidget)
 
     def actionImage_Viewer(self):
Index: src/sas/qtgui/MainWindow/MainWindow.py
===================================================================
--- src/sas/qtgui/MainWindow/MainWindow.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/MainWindow/MainWindow.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -69,5 +69,5 @@
     # Show the main SV window
     mainwindow = MainSasViewWindow()
-    mainwindow.showMaximized()
+    mainwindow.show()
 
     # no more splash screen
Index: src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/FittingWidget.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Perspectives/Fitting/FittingWidget.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -60,5 +60,5 @@
         QtGui.QStandardItemModel.__init__(self,parent)
 
-    def headerData(self, section, orientation, role):
+    def headerData(self, section, orientation, role=QtCore.Qt.DisplayRole):
         """
         Displays tooltip for each column's header
@@ -586,5 +586,5 @@
         elif model_column in [self.lstPoly.itemDelegate().poly_min, self.lstPoly.itemDelegate().poly_max]:
             try:
-                value = float(item.text())
+                value = GuiUtils.toDouble(item.text())
             except ValueError:
                 # Can't be converted properly, bring back the old value and exit
@@ -601,5 +601,5 @@
         else:
             try:
-                value = float(item.text())
+                value = GuiUtils.toDouble(item.text())
             except ValueError:
                 # Can't be converted properly, bring back the old value and exit
@@ -618,5 +618,5 @@
         model_row = item.row()
         name_index = self._magnet_model.index(model_row, 0)
-        parameter_name = str(self._magnet_model.data(name_index).toPyObject())
+        parameter_name = str(self._magnet_model.data(name_index))
 
         if model_column == 0:
@@ -634,10 +634,10 @@
         # Extract changed value.
         try:
-            value = float(item.text())
+            value = GuiUtils.toDouble(item.text())
         except ValueError:
             # Unparsable field
             return
 
-        property_index = self._magnet_model.headerData(1, model_column).toInt()[0]-1 # Value, min, max, etc.
+        property_index = self._magnet_model.headerData(1, model_column)-1 # Value, min, max, etc.
 
         # Update the parameter value - note: this supports +/-inf as well
@@ -1295,9 +1295,10 @@
         # Extract changed value.
         try:
-            value = float(item.text())
+            value = GuiUtils.toDouble(item.text())
         except ValueError:
             # Unparsable field
             return
-        parameter_name = str(self._model_model.data(name_index)) #.toPyObject()) # sld, background etc.
+
+        parameter_name = str(self._model_model.data(name_index)) # sld, background etc.
 
         # Update the parameter value - note: this supports +/-inf as well
@@ -1678,7 +1679,7 @@
         datafile = QtWidgets.QFileDialog.getOpenFileName(
             self, "Choose a weight file", "", "All files (*.*)", None,
-            QtWidgets.QFileDialog.DontUseNativeDialog)
-
-        if datafile is None or str(datafile)=='':
+            QtWidgets.QFileDialog.DontUseNativeDialog)[0]
+
+        if not datafile:
             logging.info("No weight data chosen.")
             raise IOError
Index: src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py	(revision 304d082fdf2d11b8729c78132d385223c5c29054)
+++ src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -4,4 +4,10 @@
 
 import sas.qtgui.Utilities.GuiUtils as GuiUtils
+
+class CommaLessValidator(QtGui.QDoubleValidator):
+    """
+    Custom double validator which doesn't allow for commas to be used as decimal point
+    """
+    pass
 
 class ModelViewDelegate(QtWidgets.QStyledItemDelegate):
@@ -44,5 +50,4 @@
         if index.column() in self.fancyColumns():
             # Units - present in nice HTML
-            #options = QtWidgets.QStyleOptionViewItemV4(option)
             options = QtWidgets.QStyleOptionViewItem(option)
             self.initStyleOption(options,index)
@@ -236,5 +241,5 @@
     def createEditor(self, widget, option, index):
         # Remember the current choice
-        current_text = index.data().toString()
+        current_text = index.data()
         if not index.isValid():
             return 0
Index: src/sas/qtgui/Plotting/BoxSum.py
===================================================================
--- src/sas/qtgui/Plotting/BoxSum.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Plotting/BoxSum.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -11,5 +11,4 @@
 
 class BoxSum(QtWidgets.QDialog, Ui_BoxSumUI):
-    apply_signal = QtCore.pyqtSignal(tuple, str)
     def __init__(self, parent=None, model=None):
         super(BoxSum, self).__init__()
@@ -24,5 +23,5 @@
 
         self.model = model
-        self.mapper = QtGui.QDataWidgetMapper()
+        self.mapper = QtWidgets.QDataWidgetMapper()
         self.mapper.setModel(self.model)
 
@@ -32,9 +31,9 @@
         self.mapper.addMapping(self.txtCenterX, 2)
         self.mapper.addMapping(self.txtCenterY, 3)
-        self.mapper.addMapping(self.lblAvg, 4, "text")
-        self.mapper.addMapping(self.lblAvgErr, 5, "text")
-        self.mapper.addMapping(self.lblSum, 6, "text")
-        self.mapper.addMapping(self.lblSumErr, 7, "text")
-        self.mapper.addMapping(self.lblNumPoints, 8, "text")
+        self.mapper.addMapping(self.lblAvg, 4, b"text")
+        self.mapper.addMapping(self.lblAvgErr, 5, b"text")
+        self.mapper.addMapping(self.lblSum, 6, b"text")
+        self.mapper.addMapping(self.lblSumErr, 7, b"text")
+        self.mapper.addMapping(self.lblNumPoints, 8, b"text")
 
         # Populate the widgets with data from the first column
@@ -43,2 +42,11 @@
         self.setFixedSize(self.minimumSizeHint())
 
+        # Handle the Apply button click
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Close).clicked.connect(self.onClose)
+
+    def onClose(self):
+        """
+        close the window containing this panel
+        """
+        self.close()
+
Index: src/sas/qtgui/Plotting/Plotter.py
===================================================================
--- src/sas/qtgui/Plotting/Plotter.py	(revision 304d082fdf2d11b8729c78132d385223c5c29054)
+++ src/sas/qtgui/Plotting/Plotter.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -160,5 +160,5 @@
 
         # refresh canvas
-        self.canvas.draw()
+        self.canvas.draw_idle()
 
     def createContextMenu(self):
Index: src/sas/qtgui/Plotting/Plotter2D.py
===================================================================
--- src/sas/qtgui/Plotting/Plotter2D.py	(revision 304d082fdf2d11b8729c78132d385223c5c29054)
+++ src/sas/qtgui/Plotting/Plotter2D.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -123,5 +123,5 @@
         """
         # Toggle the scale
-        zmin_temp = self.zmin
+        zmin_temp = self.zmin if self.zmin else MIN_Z
         zmax_temp = self.zmax
         # self.scale predefined in the baseclass
Index: src/sas/qtgui/Plotting/PlotterBase.py
===================================================================
--- src/sas/qtgui/Plotting/PlotterBase.py	(revision 304d082fdf2d11b8729c78132d385223c5c29054)
+++ src/sas/qtgui/Plotting/PlotterBase.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -34,4 +34,7 @@
         self.manager = manager
         self.quickplot = quickplot
+
+        #plt.style.use('ggplot')
+        plt.style.use('seaborn-darkgrid')
 
         # a figure instance to plot on
Index: src/sas/qtgui/Plotting/Slicers/BoxSum.py
===================================================================
--- src/sas/qtgui/Plotting/Slicers/BoxSum.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Plotting/Slicers/BoxSum.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -6,5 +6,5 @@
 from PyQt5 import QtGui
 
-from sas.qtgui.Utilities.GuiUtils import formatNumber
+from sas.qtgui.Utilities.GuiUtils import formatNumber, toDouble
 
 from .BaseInteractor import BaseInteractor
@@ -137,8 +137,8 @@
         """
         params = {}
-        params["Height"] = float(self.model().item(0, 0).text())
-        params["Width"] = float(self.model().item(0, 1).text())
-        params["center_x"] = float(self.model().item(0, 2).text())
-        params["center_y"] = float(self.model().item(0, 3).text())
+        params["Height"] = toDouble(self.model().item(0, 0).text())
+        params["Width"] = toDouble(self.model().item(0, 1).text())
+        params["center_x"] = toDouble(self.model().item(0, 2).text())
+        params["center_y"] = toDouble(self.model().item(0, 3).text())
         self.update_model = False
         self.setParams(params)
Index: src/sas/qtgui/Utilities/GuiUtils.py
===================================================================
--- src/sas/qtgui/Utilities/GuiUtils.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Utilities/GuiUtils.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -249,5 +249,5 @@
         plot_item = item.child(index)
         if plot_item.isCheckable():
-            plot_data = plot_item.child(0).data() #.toPyObject()
+            plot_data = plot_item.child(0).data()
             if plot_data.id is not None and plot_data.id == py_update_data.id:
                 # replace data section in item
@@ -270,6 +270,4 @@
     Adds 'update_data' to that row.
     """
-    #assert isinstance(update_data, QtCore.QVariant)
-    #py_update_data = update_data.toPyObject()
     py_update_data = update_data
 
@@ -339,5 +337,5 @@
         if str(item.text()) == filename:
             # TODO: assure item type is correct (either data1/2D or Plotter)
-            plot_data.append(item.child(0).data()) #.toPyObject())
+            plot_data.append(item.child(0).data())
             # Going 1 level deeper only
             for index_2 in range(item.rowCount()):
@@ -345,5 +343,5 @@
                 if item_2 and item_2.isCheckable():
                     # TODO: assure item type is correct (either data1/2D or Plotter)
-                    plot_data.append(item_2.child(0).data()) #.toPyObject())
+                    plot_data.append(item_2.child(0).data())
 
     return plot_data
@@ -361,5 +359,5 @@
         if item.isCheckable() and item.checkState() == QtCore.Qt.Checked:
             # TODO: assure item type is correct (either data1/2D or Plotter)
-            plot_data.append((item, item.child(0).data())) #.toPyObject()))
+            plot_data.append((item, item.child(0).data()))
         # Going 1 level deeper only
         for index_2 in range(item.rowCount()):
@@ -367,5 +365,5 @@
             if item_2 and item_2.isCheckable() and item_2.checkState() == QtCore.Qt.Checked:
                 # TODO: assure item type is correct (either data1/2D or Plotter)
-                plot_data.append((item_2, item_2.child(0).data())) #.toPyObject()))
+                plot_data.append((item_2, item_2.child(0).data()))
 
     return plot_data
@@ -635,12 +633,16 @@
   
     def validate(self, input, pos):
-        try:
-            Formula(str(input))
-            self._setStyleSheet("")
-            return QtGui.QValidator.Acceptable, pos
-
-        except Exception as e:
-            self._setStyleSheet("background-color:pink;")
-            return QtGui.QValidator.Intermediate, pos
+
+        self._setStyleSheet("")
+        return QtGui.QValidator.Acceptable, pos
+
+        #try:
+        #    Formula(str(input))
+        #    self._setStyleSheet("")
+        #    return QtGui.QValidator.Acceptable, pos
+
+        #except Exception as e:
+        #    self._setStyleSheet("background-color:pink;")
+        #    return QtGui.QValidator.Intermediate, pos
 
     def _setStyleSheet(self, value):
@@ -756,5 +758,5 @@
     The assumption - data stored in SasView standard, in child 0
     """
-    return item.child(0).data() #.toPyObject()
+    return item.child(0).data()
 
 def formatNumber(value, high=False):
@@ -806,2 +808,19 @@
     else:
         return name
+
+def toDouble(value_string):
+    """
+    toFloat conversion which cares deeply about user's locale
+    """
+    # Holy shit this escalated quickly in Qt5.
+    # No more float() cast on general locales.
+    value = QtCore.QLocale().toFloat(value_string)
+    if value[1]:
+        return value[0]
+
+    # Try generic locale
+    value = QtCore.QLocale(QtCore.QLocale('en_US')).toFloat(value_string)
+    if value[1]:
+        return value[0]
+    else:
+        raise ValueError
Index: src/sas/qtgui/Utilities/IPythonWidget.py
===================================================================
--- src/sas/qtgui/Utilities/IPythonWidget.py	(revision 0849aec6ceb97781213ef369f98e5eb61ec8cad3)
+++ src/sas/qtgui/Utilities/IPythonWidget.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -3,5 +3,5 @@
 from PyQt5 import QtWidgets
 
-##from PyQt4 import QtSvg
+from PyQt5 import QtSvg
 
 def new_load_qt(api_options):
@@ -18,6 +18,6 @@
 # Do some monkey patching to satisfy pyinstaller complaining
 # about pyside/pyqt confusion
-qt_loaders.load_qt = new_load_qt
-qtconsole_qt_loaders.load_qt = qtconsole_new_load_qt
+#qt_loaders.load_qt = new_load_qt
+#qtconsole_qt_loaders.load_qt = qtconsole_new_load_qt
 
 from qtconsole.rich_jupyter_widget import RichJupyterWidget
Index: src/sas/sascalc/calculator/resolution_calculator.py
===================================================================
--- src/sas/sascalc/calculator/resolution_calculator.py	(revision d6e5b315bdc39261a8206d67a984a30ebf4a0a4e)
+++ src/sas/sascalc/calculator/resolution_calculator.py	(revision 6280464f8c6799ad2cb851c2fbb6ad66dc0fe2ba)
@@ -1007,6 +1007,6 @@
         try:
             detector_offset = self.sample2detector_distance[1]
-        except:
-            logger.error(sys.exc_value)
+        except Exception as ex:
+            logger.error(ex)
 
         # detector size in [no of pix_x,no of pix_y]
@@ -1057,7 +1057,7 @@
         # qx_value and qy_value values in array
         qx_value = qx_value.repeat(detector_pix_nums_y)
-        qx_value = qx_value.reshape(detector_pix_nums_x, detector_pix_nums_y)
+        qx_value = qx_value.reshape(int(detector_pix_nums_x), int(detector_pix_nums_y))
         qy_value = qy_value.repeat(detector_pix_nums_x)
-        qy_value = qy_value.reshape(detector_pix_nums_y, detector_pix_nums_x)
+        qy_value = qy_value.reshape(int(detector_pix_nums_y), int(detector_pix_nums_x))
         qy_value = qy_value.transpose()
 
