Changeset 0849aec in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Oct 30, 2017 7:50:09 AM (7 years ago)
- 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:
- 304d082
- Parents:
- 99ea1b0
- Location:
- src/sas/qtgui/Perspectives
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingOptions.py
- Property mode changed from 100755 to 100644
rb0b09b9 r0849aec 4 4 import types 5 5 6 from PyQt4 import QtCore 7 from PyQt4 import QtGui 8 from PyQt4 import QtWebKit 6 from PyQt5 import QtCore 7 from PyQt5 import QtGui 8 from PyQt5 import QtWidgets 9 from PyQt5 import QtWebKitWidgets 9 10 10 11 from sas.qtgui.UI import images_rc … … 21 22 22 23 23 class FittingOptions(Qt Gui.QDialog, Ui_FittingOptions):24 class FittingOptions(QtWidgets.QDialog, Ui_FittingOptions): 24 25 """ 25 26 Hard-coded version of the fit options dialog available from BUMPS. … … 52 53 53 54 # Handle the Apply button click 54 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).clicked.connect(self.onApply)55 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).clicked.connect(self.onApply) 55 56 # handle the Help button click 56 self.buttonBox.button(Qt Gui.QDialogButtonBox.Help).clicked.connect(self.onHelp)57 self.buttonBox.button(QtWidgets.QDialogButtonBox.Help).clicked.connect(self.onHelp) 57 58 58 59 # Handle the combo box changes … … 71 72 72 73 # OK has to be initialized to True, after initial validator setup 73 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).setEnabled(True)74 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 74 75 75 76 # Display HTML content 76 self.helpView = QtWebKit .QWebView()77 self.helpView = QtWebKitWidgets.QWebView() 77 78 78 79 def assignValidators(self): … … 104 105 if state == QtGui.QValidator.Acceptable: 105 106 color = '' # default 106 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).setEnabled(True)107 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 107 108 else: 108 109 color = '#fff79a' # yellow 109 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).setEnabled(False)110 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(False) 110 111 111 112 sender.setStyleSheet('QLineEdit { background-color: %s }' % color) … … 134 135 135 136 # OK has to be reinitialized to True 136 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).setEnabled(True)137 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 137 138 138 139 def onApply(self): … … 148 149 """ 149 150 widget = self.widgetFromOption(option) 150 new_value = widget.currentText() if isinstance(widget, Qt Gui.QComboBox) \151 new_value = widget.currentText() if isinstance(widget, QtWidgets.QComboBox) \ 151 152 else float(widget.text()) 152 153 self.config.values[self.current_fitter_id][option] = new_value -
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
- Property mode changed from 100755 to 100644
rb0b09b9 r0849aec 1 1 import numpy 2 2 3 from PyQt4 import QtCore 4 from PyQt4 import QtGui 3 from PyQt5 import QtCore 4 from PyQt5 import QtGui 5 from PyQt5 import QtWidgets 5 6 6 7 from bumps import options … … 13 14 #from sas.qtgui.Perspectives.Fitting import ModelUtilities 14 15 15 class FittingWindow(Qt Gui.QTabWidget):16 class FittingWindow(QtWidgets.QTabWidget): 16 17 """ 17 18 """ 18 19 name = "Fitting" # For displaying in the combo box in DataExplorer 19 20 def __init__(self, parent=None, data=None): 21 20 22 super(FittingWindow, self).__init__() 21 23 -
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r895e7359 r0849aec 1 1 from copy import deepcopy 2 2 3 from PyQt4 import QtGui 4 from PyQt4 import QtCore 3 from PyQt5 import QtCore 4 from PyQt5 import QtGui 5 from PyQt5 import QtWidgets 5 6 6 7 import numpy -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r99ea1b0 r0849aec 9 9 import numpy as np 10 10 11 from PyQt4 import QtGui 12 from PyQt4 import QtCore 13 from PyQt4 import QtWebKit 11 from PyQt5 import QtCore 12 from PyQt5 import QtGui 13 from PyQt5 import QtWidgets 14 from PyQt5 import QtWebKitWidgets 14 15 15 16 from sasmodels import generate … … 73 74 return QtGui.QStandardItemModel.headerData(self, section, orientation, role) 74 75 75 class FittingWidget(Qt Gui.QWidget, Ui_FittingWidgetUI):76 class FittingWidget(QtWidgets.QWidget, Ui_FittingWidgetUI): 76 77 """ 77 78 Main widget for selecting form and structure factor models … … 120 121 121 122 # Display HTML content 122 self.helpView = QtWebKit .QWebView()123 self.helpView = QtWebKitWidgets.QWebView() 123 124 124 125 # New font to display angstrom symbol … … 228 229 """ 229 230 # Options widget 230 layout = Qt Gui.QGridLayout()231 layout = QtWidgets.QGridLayout() 231 232 self.options_widget = OptionsWidget(self, self.logic) 232 233 layout.addWidget(self.options_widget) … … 234 235 235 236 # Smearing widget 236 layout = Qt Gui.QGridLayout()237 layout = QtWidgets.QGridLayout() 237 238 self.smearing_widget = SmearingWidget(self) 238 239 layout.addWidget(self.smearing_widget) … … 249 250 250 251 # Magnetic angles explained in one picture 251 self.magneticAnglesWidget = Qt Gui.QWidget()252 labl = Qt Gui.QLabel(self.magneticAnglesWidget)252 self.magneticAnglesWidget = QtWidgets.QWidget() 253 labl = QtWidgets.QLabel(self.magneticAnglesWidget) 253 254 pixmap = QtGui.QPixmap(GuiUtils.IMAGES_DIRECTORY_LOCATION + '/M_angles_pic.bmp') 254 255 labl.setPixmap(pixmap) … … 269 270 self.lstParams.setModel(self._model_model) 270 271 self.readCategoryInfo() 272 271 273 self.model_parameters = None 272 274 … … 302 304 self.lstParams.customContextMenuRequested.connect(self.showModelDescription) 303 305 self.lstParams.setAttribute(QtCore.Qt.WA_MacShowFocusRect, False) 304 305 306 # Poly model displayed in poly list 306 307 self.lstPoly.setModel(self._poly_model) … … 460 461 msg += "You must select a model to get information on this" 461 462 462 menu = Qt Gui.QMenu()463 label = Qt Gui.QLabel(msg)463 menu = QtWidgets.QMenu() 464 label = QtWidgets.QLabel(msg) 464 465 action = QtGui.QWidgetAction(self) 465 466 action.setDefaultWidget(label) … … 909 910 self.lstParams.resizeColumnToContents(4) 910 911 self.lstParams.resizeColumnToContents(5) 911 self.lstParams.setSizePolicy(Qt Gui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding)912 self.lstParams.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) 912 913 913 914 self.has_error_column = True … … 1224 1225 # Adjust the table cells width 1225 1226 self.lstParams.resizeColumnToContents(0) 1226 self.lstParams.setSizePolicy(Qt Gui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding)1227 self.lstParams.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) 1227 1228 1228 1229 # Now we claim the model has been loaded … … 1527 1528 table.verticalHeader().setVisible(False) 1528 1529 table.setAlternatingRowColors(True) 1529 table.setSizePolicy(Qt Gui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding)1530 table.setSelectionBehavior(Qt Gui.QAbstractItemView.SelectRows)1530 table.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) 1531 table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) 1531 1532 table.resizeColumnsToContents() 1532 1533 1533 1534 # Header 1534 1535 header = table.horizontalHeader() 1535 header.setResizeMode(QtGui.QHeaderView.ResizeToContents) 1536 1537 header.ResizeMode(QtGui.QHeaderView.Interactive) 1536 header.setSectionResizeMode(QtWidgets.QHeaderView.ResizeToContents) 1537 header.ResizeMode(QtWidgets.QHeaderView.Interactive) 1538 1539 # Qt5: the following 2 lines crash - figure out why! 1538 1540 # Resize column 0 and 7 to content 1539 header.setResizeMode(0, QtGui.QHeaderView.ResizeToContents)1540 header.setResizeMode(7, QtGui.QHeaderView.ResizeToContents)1541 #header.setSectionResizeMode(0, QtWidgets.QHeaderView.ResizeToContents) 1542 #header.setSectionResizeMode(7, QtWidgets.QHeaderView.ResizeToContents) 1541 1543 1542 1544 def setPolyModel(self): … … 1591 1593 1592 1594 # All possible polydisp. functions as strings in combobox 1593 func = Qt Gui.QComboBox()1595 func = QtWidgets.QComboBox() 1594 1596 func.addItems([str(name_disp) for name_disp in POLYDISPERSITY_MODELS.keys()]) 1595 1597 # Set the default index … … 1674 1676 Show the load file dialog and loads requested data into state 1675 1677 """ 1676 datafile = Qt Gui.QFileDialog.getOpenFileName(1677 self, "Choose a weight file", "", "All files (*.*)", 1678 Qt Gui.QFileDialog.DontUseNativeDialog)1678 datafile = QtWidgets.QFileDialog.getOpenFileName( 1679 self, "Choose a weight file", "", "All files (*.*)", None, 1680 QtWidgets.QFileDialog.DontUseNativeDialog) 1679 1681 1680 1682 if datafile is None or str(datafile)=='': … … 1775 1777 item1 = QtGui.QStandardItem(param_name) 1776 1778 1777 func = Qt Gui.QComboBox()1779 func = QtWidgets.QComboBox() 1778 1780 # Available range of shells displayed in the combobox 1779 1781 func.addItems([str(i) for i in range(param_length+1)]) -
src/sas/qtgui/Perspectives/Fitting/OptionsWidget.py
- Property mode changed from 100755 to 100644
rb0b09b9 r0849aec 3 3 """ 4 4 import numpy as np 5 from PyQt4 import QtGui 6 from PyQt4 import QtCore 5 from PyQt5 import QtCore 6 from PyQt5 import QtGui 7 from PyQt5 import QtWidgets 7 8 8 9 from sas.qtgui.Plotting.PlotterData import Data2D … … 21 22 'LOG_SPACED'] 22 23 23 class DataWidgetMapper(Qt Gui.QDataWidgetMapper):24 class DataWidgetMapper(QtWidgets.QDataWidgetMapper): 24 25 """ 25 26 Custom version of the standard QDataWidgetMapper allowing for proper … … 32 33 super(DataWidgetMapper, self).addMapping(widget, section, propertyName) 33 34 34 if isinstance(widget, Qt Gui.QComboBox):35 if isinstance(widget, QtWidgets.QComboBox): 35 36 delegate = self.itemDelegate() 36 37 widget.currentIndexChanged.connect(lambda: delegate.commitData.emit(widget)) 37 38 38 elif isinstance(widget, Qt Gui.QCheckBox):39 elif isinstance(widget, QtWidgets.QCheckBox): 39 40 delegate = self.itemDelegate() 40 41 widget.stateChanged.connect(lambda: delegate.commitData.emit(widget)) 41 42 42 class OptionsWidget(Qt Gui.QWidget, Ui_tabOptions):43 class OptionsWidget(QtWidgets.QWidget, Ui_tabOptions): 43 44 plot_signal = QtCore.pyqtSignal() 44 45 def __init__(self, parent=None, logic=None): … … 52 53 53 54 # Weight radio box group 54 self.weightingGroup = Qt Gui.QButtonGroup()55 self.weightingGroup = QtWidgets.QButtonGroup() 55 56 self.weighting = 0 56 57 … … 114 115 self.mapper.addMapping(self.txtNpts, MODEL.index('NPTS')) 115 116 self.mapper.addMapping(self.chkLogData, MODEL.index('LOG_SPACED')) 116 self.mapper.toFirst() 117 # FIXME DOESNT WORK WITH QT5 118 #self.mapper.toFirst() 117 119 118 120 def toggleLogData(self, isChecked): -
src/sas/qtgui/Perspectives/Fitting/SmearingWidget.py
- Property mode changed from 100755 to 100644
rb0b09b9 r0849aec 2 2 Widget/logic for smearing data. 3 3 """ 4 from PyQt4 import QtGui 5 from PyQt4 import QtCore 4 from PyQt5 import QtCore 5 from PyQt5 import QtGui 6 from PyQt5 import QtWidgets 6 7 7 8 from sas.qtgui.Plotting.PlotterData import Data1D … … 11 12 from sas.qtgui.Perspectives.Fitting.UI.SmearingWidgetUI import Ui_SmearingWidgetUI 12 13 13 class DataWidgetMapper(Qt Gui.QDataWidgetMapper):14 class DataWidgetMapper(QtWidgets.QDataWidgetMapper): 14 15 """ 15 16 Custom version of the standard QDataWidgetMapper allowing for proper … … 22 23 super(DataWidgetMapper, self).addMapping(widget, section, propertyName) 23 24 24 if isinstance(widget, Qt Gui.QComboBox):25 if isinstance(widget, QtWidgets.QComboBox): 25 26 delegate = self.itemDelegate() 26 27 widget.currentIndexChanged.connect(lambda: delegate.commitData.emit(widget)) … … 35 36 'ACCURACY'] 36 37 37 class SmearingWidget(Qt Gui.QWidget, Ui_SmearingWidgetUI):38 class SmearingWidget(QtWidgets.QWidget, Ui_SmearingWidgetUI): 38 39 def __init__(self, parent=None): 39 40 super(SmearingWidget, self).__init__() … … 83 84 self.mapper.addMapping(self.cbSmearing, MODEL.index('SMEARING')) 84 85 self.mapper.addMapping(self.cbAccuracy, MODEL.index('ACCURACY')) 85 self.mapper.toFirst() 86 87 # FIXME DOESNT WORK WITH QT5 88 #self.mapper.toFirst() 86 89 87 90 def updateSmearing(self, data=None): -
src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py
r7ffa5ee9 r0849aec 1 from PyQt4 import QtGui 2 from PyQt4 import QtCore 1 from PyQt5 import QtCore 2 from PyQt5 import QtGui 3 from PyQt5 import QtWidgets 3 4 4 5 import sas.qtgui.Utilities.GuiUtils as GuiUtils 5 6 6 class ModelViewDelegate(Qt Gui.QStyledItemDelegate):7 class ModelViewDelegate(QtWidgets.QStyledItemDelegate): 7 8 """ 8 9 Custom delegate for appearance and behavior control of the model view … … 12 13 Overwrite generic constructor to allow for some globals 13 14 """ 14 super(Qt Gui.QStyledItemDelegate, self).__init__()15 super(QtWidgets.QStyledItemDelegate, self).__init__() 15 16 16 17 # Main parameter table view columns … … 43 44 if index.column() in self.fancyColumns(): 44 45 # Units - present in nice HTML 45 options = QtGui.QStyleOptionViewItemV4(option) 46 #options = QtWidgets.QStyleOptionViewItemV4(option) 47 options = QtWidgets.QStyleOptionViewItem(option) 46 48 self.initStyleOption(options,index) 47 49 … … 57 59 # delete the original content 58 60 options.text = "" 59 style.drawControl(Qt Gui.QStyle.CE_ItemViewItem, options, painter, options.widget);61 style.drawControl(QtWidgets.QStyle.CE_ItemViewItem, options, painter, options.widget); 60 62 61 63 context = QtGui.QAbstractTextDocumentLayout.PaintContext() 62 textRect = style.subElementRect(Qt Gui.QStyle.SE_ItemViewItemText, options)64 textRect = style.subElementRect(QtWidgets.QStyle.SE_ItemViewItemText, options) 63 65 64 66 painter.save() … … 70 72 else: 71 73 # Just the default paint 72 Qt Gui.QStyledItemDelegate.paint(self, painter, option, index)74 QtWidgets.QStyledItemDelegate.paint(self, painter, option, index) 73 75 74 76 def createEditor(self, widget, option, index): … … 79 81 return 0 80 82 if index.column() == self.param_value: #only in the value column 81 editor = Qt Gui.QLineEdit(widget)83 editor = QtWidgets.QLineEdit(widget) 82 84 validator = QtGui.QDoubleValidator() 83 85 editor.setValidator(validator) … … 100 102 # balloon popup? tooltip? cell background colour flash? 101 103 return 102 Qt Gui.QStyledItemDelegate.setModelData(self, editor, model, index)103 104 105 class PolyViewDelegate(Qt Gui.QStyledItemDelegate):104 QtWidgets.QStyledItemDelegate.setModelData(self, editor, model, index) 105 106 107 class PolyViewDelegate(QtWidgets.QStyledItemDelegate): 106 108 """ 107 109 Custom delegate for appearance and behavior control of the polydispersity view … … 116 118 Overwrite generic constructor to allow for some globals 117 119 """ 118 super(Qt Gui.QStyledItemDelegate, self).__init__()120 super(QtWidgets.QStyledItemDelegate, self).__init__() 119 121 120 122 self.poly_parameter = 0 … … 160 162 return None 161 163 elif index.column() in self.editableParameters(): 162 self.editor = Qt Gui.QLineEdit(widget)164 self.editor = QtWidgets.QLineEdit(widget) 163 165 validator = QtGui.QDoubleValidator() 164 166 self.editor.setValidator(validator) 165 167 return self.editor 166 168 else: 167 Qt Gui.QStyledItemDelegate.createEditor(self, widget, option, index)169 QtWidgets.QStyledItemDelegate.createEditor(self, widget, option, index) 168 170 169 171 def paint(self, painter, option, index): … … 173 175 if index.column() in (self.poly_min, self.poly_max): 174 176 # Units - present in nice HTML 175 options = Qt Gui.QStyleOptionViewItemV4(option)177 options = QtWidgets.QStyleOptionViewItem(option) 176 178 self.initStyleOption(options,index) 177 179 … … 187 189 # delete the original content 188 190 options.text = "" 189 style.drawControl(Qt Gui.QStyle.CE_ItemViewItem, options, painter, options.widget);191 style.drawControl(QtWidgets.QStyle.CE_ItemViewItem, options, painter, options.widget); 190 192 191 193 context = QtGui.QAbstractTextDocumentLayout.PaintContext() 192 textRect = style.subElementRect(Qt Gui.QStyle.SE_ItemViewItemText, options)194 textRect = style.subElementRect(QtWidgets.QStyle.SE_ItemViewItemText, options) 193 195 194 196 painter.save() … … 200 202 else: 201 203 # Just the default paint 202 Qt Gui.QStyledItemDelegate.paint(self, painter, option, index)203 204 class MagnetismViewDelegate(Qt Gui.QStyledItemDelegate):204 QtWidgets.QStyledItemDelegate.paint(self, painter, option, index) 205 206 class MagnetismViewDelegate(QtWidgets.QStyledItemDelegate): 205 207 """ 206 208 Custom delegate for appearance and behavior control of the magnetism view … … 210 212 Overwrite generic constructor to allow for some globals 211 213 """ 212 super(Qt Gui.QStyledItemDelegate, self).__init__()214 super(QtWidgets.QStyledItemDelegate, self).__init__() 213 215 214 216 self.mag_parameter = 0 … … 238 240 return 0 239 241 if index.column() in self.editableParameters(): 240 editor = Qt Gui.QLineEdit(widget)242 editor = QtWidgets.QLineEdit(widget) 241 243 validator = QtGui.QDoubleValidator() 242 244 editor.setValidator(validator) 243 245 return editor 244 246 else: 245 Qt Gui.QStyledItemDelegate.createEditor(self, widget, option, index)247 QtWidgets.QStyledItemDelegate.createEditor(self, widget, option, index) 246 248 247 249 def paint(self, painter, option, index): … … 251 253 if index.column() in (self.mag_min, self.mag_max, self.mag_unit): 252 254 # Units - present in nice HTML 253 options = Qt Gui.QStyleOptionViewItemV4(option)255 options = QtWidgets.QStyleOptionViewItem(option) 254 256 self.initStyleOption(options,index) 255 257 … … 265 267 # delete the original content 266 268 options.text = "" 267 style.drawControl(Qt Gui.QStyle.CE_ItemViewItem, options, painter, options.widget);269 style.drawControl(QtWidgets.QStyle.CE_ItemViewItem, options, painter, options.widget); 268 270 269 271 context = QtGui.QAbstractTextDocumentLayout.PaintContext() 270 textRect = style.subElementRect(Qt Gui.QStyle.SE_ItemViewItemText, options)272 textRect = style.subElementRect(QtWidgets.QStyle.SE_ItemViewItemText, options) 271 273 272 274 painter.save() … … 278 280 else: 279 281 # Just the default paint 280 Qt Gui.QStyledItemDelegate.paint(self, painter, option, index)282 QtWidgets.QStyledItemDelegate.paint(self, painter, option, index) -
src/sas/qtgui/Perspectives/Invariant/InvariantDetails.py
- Property mode changed from 100755 to 100644
rb0b09b9 r0849aec 1 1 import sys 2 2 import os 3 from PyQt4 import QtCore 4 from PyQt4 import QtGui 3 from PyQt5 import QtCore 4 from PyQt5 import QtGui 5 from PyQt5 import QtWidgets 5 6 6 7 # local … … 8 9 from .InvariantUtils import WIDGETS 9 10 10 class DetailsDialog(Qt Gui.QDialog, Ui_Dialog):11 class DetailsDialog(QtWidgets.QDialog, Ui_Dialog): 11 12 """ 12 13 """ -
src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py
r99ea1b0 r0849aec 2 2 import sys 3 3 import os 4 from PyQt4 import QtCore 5 from PyQt4 import QtGui 6 from PyQt4 import QtWebKit 4 from PyQt5 import QtCore 5 from PyQt5 import QtGui 6 from PyQt5 import QtWidgets 7 from PyQt5 import QtWebKitWidgets 7 8 8 9 from twisted.internet import threads … … 35 36 self._model.appendRow(item) 36 37 37 class InvariantWindow(Qt Gui.QDialog, Ui_tabbedInvariantUI):38 class InvariantWindow(QtWidgets.QDialog, Ui_tabbedInvariantUI): 38 39 # The controller which is responsible for managing signal slots connections 39 40 # for the gui and providing an interface to the data model. … … 61 62 self._model_item = QtGui.QStandardItem() 62 63 63 self._helpView = QtWebKit .QWebView()64 self._helpView = QtWebKitWidgets.QWebView() 64 65 self.detailsDialog = DetailsDialog(self) 65 66 … … 502 503 def setupMapper(self): 503 504 # Set up the mapper. 504 self.mapper = Qt Gui.QDataWidgetMapper(self)505 self.mapper = QtWidgets.QDataWidgetMapper(self) 505 506 self.mapper.setOrientation(QtCore.Qt.Vertical) 506 507 self.mapper.setModel(self.model) … … 543 544 self.mapper.addMapping(self.lineEdit_18, WIDGETS.W_INVARIANT_ERR) 544 545 545 self.mapper.toFirst() 546 # FIXME DOESNT WORK WITH QT5 547 #self.mapper.toFirst() 546 548 547 549 def setData(self, data_item, is_batch=False): … … 644 646 """ 645 647 return False 646 647 if __name__ == "__main__":648 app = QtGui.QApplication([])649 import qt4reactor650 qt4reactor.install()651 # DO NOT move the following import to the top!652 # (unless you know what you're doing)653 from twisted.internet import reactor654 dlg = InvariantWindow(reactor)655 dlg.show()656 reactor.run()
Note: See TracChangeset
for help on using the changeset viewer.