Skip to content

Commit f6ac329

Browse files
committed
Fixes TypeError on QwtPlotLayout.minimumSizeHint
1 parent b66eb55 commit f6ac329

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

qwt/plot_layout.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515

1616
import math
1717

18-
from qwt.text import QwtText
19-
from qwt.scale_widget import QwtScaleWidget
20-
from qwt.plot import QwtPlot
21-
from qwt.scale_draw import QwtAbstractScaleDraw
22-
18+
from qtpy.QtCore import QRectF, QSize, Qt
2319
from qtpy.QtGui import QFont, QRegion
24-
from qtpy.QtCore import QSize, Qt, QRectF
2520

21+
from qwt.plot import QwtPlot
22+
from qwt.scale_draw import QwtAbstractScaleDraw
23+
from qwt.scale_widget import QwtScaleWidget
24+
from qwt.text import QwtText
2625

2726
QWIDGETSIZE_MAX = (1 << 24) - 1
2827

@@ -681,7 +680,7 @@ def __init__(self):
681680
if self.__data.legendRatio < 1.0:
682681
legendH = min([legendH, int(h / (1.0 - self.__data.legendRatio))])
683682
h += legendH + self.__data.spacing
684-
return QSize(w, h)
683+
return QSize(int(w), int(h))
685684

686685
def layoutLegend(self, options, rect):
687686
"""

0 commit comments

Comments
 (0)