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


Ignore:
Timestamp:
Nov 9, 2017 8:43:55 AM (6 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:
d6b8a1d
Parents:
7969b9c
git-author:
Piotr Rozyczko <rozyczko@…> (11/03/17 10:58:39)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:55)
Message:

More Qt5 related fixes.

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

Legend:

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

    r7969b9c rfbfc488  
    218218            'options'   : QtWidgets.QFileDialog.DontUseNativeDialog 
    219219        } 
    220         filename = str(QtWidgets.QFileDialog.getOpenFileName(**kwargs)) 
     220        filename = QtWidgets.QFileDialog.getOpenFileName(**kwargs)[0] 
    221221        if filename: 
    222222            load_thread = threads.deferToThread(self.readProject, filename) 
     
    582582        # Show the plot 
    583583        new_plot.show() 
     584        new_plot.canvas.draw() 
    584585 
    585586        # Update the active chart list 
     
    628629        paths = QtWidgets.QFileDialog.getOpenFileNames(self, "Choose a file", "", 
    629630                wlist, None, QtWidgets.QFileDialog.DontUseNativeDialog)[0] 
    630         # [0] is new in Qt5 as getOpenFileNames() returns now a tuple! 
    631         if paths is None: 
     631        if not paths: 
    632632            return 
    633633 
  • src/sas/qtgui/MainWindow/GuiManager.py

    r7969b9c rfbfc488  
    88from PyQt5.QtWidgets import * 
    99from PyQt5.QtGui import * 
    10 from PyQt5.QtCore import Qt 
     10from PyQt5.QtCore import Qt, QLocale 
    1111from PyQt5.QtWebKitWidgets import QWebView 
    1212 
     
    198198 
    199199        # Resize to the workspace height 
    200         #workspace_height = self._workspace.workspace.sizeHint().height() 
    201         #perspective_size = self._current_perspective.sizeHint() 
     200        workspace_height = self._workspace.workspace.sizeHint().height() 
     201        perspective_size = self._current_perspective.sizeHint() 
    202202        #if workspace_height < perspective_size.height(): 
    203         #    perspective_width = perspective_size.width() 
    204         #    self._current_perspective.resize(perspective_width, workspace_height-10) 
     203        perspective_width = perspective_size.width() 
     204        self._current_perspective.resize(perspective_width, workspace_height-10) 
    205205 
    206206        self._current_perspective.show() 
     
    592592        self.ipDockWidget.setObjectName("IPythonDockWidget") 
    593593        self.ipDockWidget.setWidget(terminal) 
    594         self._workspace.workspace.addSubWindow(self.ipDockWidget, Qt.RightDockWidgetArea) 
     594        self._workspace.addDockWidget(Qt.RightDockWidgetArea, self.ipDockWidget) 
    595595 
    596596    def actionImage_Viewer(self): 
  • src/sas/qtgui/MainWindow/MainWindow.py

    r4992ff2 rfbfc488  
    6969    # Show the main SV window 
    7070    mainwindow = MainSasViewWindow() 
    71     mainwindow.showMaximized() 
     71    mainwindow.show() 
    7272 
    7373    # no more splash screen 
Note: See TracChangeset for help on using the changeset viewer.