remove setMargin and setResizeMode shims
This commit is contained in:
parent
97f5459573
commit
7192df7032
@ -320,14 +320,6 @@ if QT_LIB in [PYQT5, PYQT6, PYSIDE2, PYSIDE6]:
|
||||
self.setTransform(tr)
|
||||
QtWidgets.QGraphicsItem.translate = translate
|
||||
|
||||
def setMargin(self, i):
|
||||
self.setContentsMargins(i, i, i, i)
|
||||
QtWidgets.QGridLayout.setMargin = setMargin
|
||||
|
||||
def setResizeMode(self, *args):
|
||||
self.setSectionResizeMode(*args)
|
||||
QtWidgets.QHeaderView.setResizeMode = setResizeMode
|
||||
|
||||
|
||||
QtGui.QApplication = QtWidgets.QApplication
|
||||
QtGui.QGraphicsScene = QtWidgets.QGraphicsScene
|
||||
|
@ -616,10 +616,7 @@ class FlowchartCtrlWidget(QtGui.QWidget):
|
||||
self.cwWin.resize(1000,800)
|
||||
|
||||
h = self.ui.ctrlList.header()
|
||||
if QT_LIB in ['PyQt4', 'PySide']:
|
||||
h.setResizeMode(0, h.Stretch)
|
||||
else:
|
||||
h.setSectionResizeMode(0, h.Stretch)
|
||||
h.setSectionResizeMode(0, h.ResizeMode.Stretch)
|
||||
|
||||
self.ui.ctrlList.itemChanged.connect(self.itemChanged)
|
||||
self.ui.loadBtn.clicked.connect(self.loadClicked)
|
||||
|
@ -1,4 +1,4 @@
|
||||
from ..Qt import QtCore, QtGui
|
||||
from ..Qt import QtCore, QtWidgets
|
||||
from ..widgets.TreeWidget import TreeWidget
|
||||
import os, weakref, re
|
||||
from .ParameterItem import ParameterItem
|
||||
@ -25,7 +25,7 @@ class ParameterTree(TreeWidget):
|
||||
self.setHeaderLabels(["Parameter", "Value"])
|
||||
self.setAlternatingRowColors(True)
|
||||
self.paramSet = None
|
||||
self.header().setResizeMode(QtGui.QHeaderView.ResizeToContents)
|
||||
self.header().setSectionResizeMode(QtWidgets.QHeaderView.ResizeMode.ResizeToContents)
|
||||
self.setHeaderHidden(not showHeader)
|
||||
self.itemChanged.connect(self.itemChangedEvent)
|
||||
self.itemExpanded.connect(self.itemExpandedEvent)
|
||||
|
Loading…
Reference in New Issue
Block a user