Changeset d6b8a1d in sasview for src/sas/qtgui/MainWindow


Ignore:
Timestamp:
Nov 9, 2017 8:43:56 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:
53c771e
Parents:
fbfc488
git-author:
Piotr Rozyczko <rozyczko@…> (11/07/17 08:29:59)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:56)
Message:

More Qt5 related fixes

Location:
src/sas/qtgui/MainWindow
Files:
3 edited

Legend:

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

    rfbfc488 rd6b8a1d  
    270270            'options'   : QtWidgets.QFileDialog.DontUseNativeDialog 
    271271        } 
    272         filename = str(QtWidgets.QFileDialog.getSaveFileName(**kwargs)) 
     272        name_tuple = QtWidgets.QFileDialog.getSaveFileName(**kwargs) 
     273        filename = name_tuple[0] 
    273274        if filename: 
     275            _, extension = os.path.splitext(filename) 
     276            if not extension: 
     277                filename = '.'.join((filename, 'json')) 
    274278            self.communicator.statusBarUpdateSignal.emit("Saving Project... %s\n" % os.path.basename(filename)) 
    275279            with open(filename, 'w') as outfile: 
     
    10841088        # TODO: fix this to resemble GuiUtils.updateModelItemWithPlot 
    10851089        # 
    1086         self.model.beginResetModel() 
    1087         current_tab_name = model_item.text()[:2] 
    1088         for current_index in range(self.theory_model.rowCount()): 
    1089             if current_tab_name in self.theory_model.item(current_index).text(): 
    1090                 self.theory_model.removeRow(current_index) 
    1091                 break 
    1092  
    1093         # Reset the view 
    1094         self.model.endResetModel() 
     1090        ##self.model.beginResetModel() 
     1091        ##current_tab_name = model_item.text()[:2] 
     1092        ##for current_index in range(self.theory_model.rowCount()): 
     1093            #if current_tab_name in self.theory_model.item(current_index).text(): 
     1094            #    return 
     1095        ##        self.theory_model.removeRow(current_index) 
     1096        ##        break 
     1097 
     1098        ### Reset the view 
     1099        ##self.model.endResetModel() 
    10951100 
    10961101        # Reset the view 
  • src/sas/qtgui/MainWindow/GuiManager.py

    rfbfc488 rd6b8a1d  
    88from PyQt5.QtWidgets import * 
    99from PyQt5.QtGui import * 
    10 from PyQt5.QtCore import Qt, QLocale 
     10from PyQt5.QtCore import Qt, QLocale, QUrl 
    1111from PyQt5.QtWebKitWidgets import QWebView 
    1212 
     
    5555        self._workspace = parent 
    5656        self._parent = parent 
     57 
     58        # Decide on a locale 
     59        QLocale.setDefault(QLocale('en_US')) 
    5760 
    5861        # Add signal callbacks 
  • src/sas/qtgui/MainWindow/MainWindow.py

    rfbfc488 rd6b8a1d  
    6161    # (unless you know what you're doing) 
    6262    import qt5reactor 
    63     # Using the Qt4 reactor wrapper from https://github.com/ghtdak/qtreactor 
     63    # Using the Qt5 reactor wrapper from https://github.com/ghtdak/qtreactor 
    6464    qt5reactor.install() 
    6565 
Note: See TracChangeset for help on using the changeset viewer.