Merge pull request #1662 from NilsNemitz/cast-to-int_in_ImageView_QSplitter.setSizes
added cast to int so that QSplitter.setSizes works on Python 3.10
This commit is contained in:
commit
1a597b80b7
@ -113,7 +113,7 @@ class Canvas(QtGui.QWidget):
|
|||||||
|
|
||||||
if not self.sizeApplied:
|
if not self.sizeApplied:
|
||||||
self.sizeApplied = True
|
self.sizeApplied = True
|
||||||
s = min(self.width(), max(100, min(200, self.width()*0.25)))
|
s = int( min(self.width(), max(100, min(200, self.width()//4))) )
|
||||||
s2 = self.width()-s
|
s2 = self.width()-s
|
||||||
self.ui.splitter.setSizes([s2, s])
|
self.ui.splitter.setSizes([s2, s])
|
||||||
|
|
||||||
|
@ -563,7 +563,7 @@ class ImageView(QtGui.QWidget):
|
|||||||
self.roi.show()
|
self.roi.show()
|
||||||
#self.ui.roiPlot.show()
|
#self.ui.roiPlot.show()
|
||||||
self.ui.roiPlot.setMouseEnabled(True, True)
|
self.ui.roiPlot.setMouseEnabled(True, True)
|
||||||
self.ui.splitter.setSizes([self.height()*0.6, self.height()*0.4])
|
self.ui.splitter.setSizes([int(self.height()*0.6), int(self.height()*0.4)])
|
||||||
self.ui.splitter.handle(1).setEnabled(True)
|
self.ui.splitter.handle(1).setEnabled(True)
|
||||||
self.roiCurve.show()
|
self.roiCurve.show()
|
||||||
self.roiChanged()
|
self.roiChanged()
|
||||||
|
Loading…
Reference in New Issue
Block a user