Skip to content

Commit

Permalink
Fixes TypeError on QwtPlotLayout.minimumSizeHint
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Nov 24, 2023
1 parent b66eb55 commit f6ac329
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions qwt/plot_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@

import math

from qwt.text import QwtText
from qwt.scale_widget import QwtScaleWidget
from qwt.plot import QwtPlot
from qwt.scale_draw import QwtAbstractScaleDraw

from qtpy.QtCore import QRectF, QSize, Qt
from qtpy.QtGui import QFont, QRegion
from qtpy.QtCore import QSize, Qt, QRectF

from qwt.plot import QwtPlot
from qwt.scale_draw import QwtAbstractScaleDraw
from qwt.scale_widget import QwtScaleWidget
from qwt.text import QwtText

QWIDGETSIZE_MAX = (1 << 24) - 1

Expand Down Expand Up @@ -681,7 +680,7 @@ def __init__(self):
if self.__data.legendRatio < 1.0:
legendH = min([legendH, int(h / (1.0 - self.__data.legendRatio))])
h += legendH + self.__data.spacing
return QSize(w, h)
return QSize(int(w), int(h))

def layoutLegend(self, options, rect):
"""
Expand Down

0 comments on commit f6ac329

Please sign in to comment.