diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp index 4a76ce0c01..bae96c26c1 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp @@ -506,6 +506,11 @@ void JKQTBasePlotter::setWidgetSize(int wid, int heigh) { redrawPlot(); } +void JKQTBasePlotter::setWidgetSize(QSize size) +{ + setWidgetSize(size.width(), size.height()); +} + int JKQTBasePlotter::getWidth() { return widgetWidth; } diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h index 1473300600..78a3bc4af6 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.h +++ b/lib/jkqtplotter/jkqtpbaseplotter.h @@ -1535,6 +1535,13 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject { * \see \ref jkqtplotter_base_plotsize */ void setWidgetSize(int width, int height); + /** \brief resize the plot + * + * \image html plot_widget_orientation.png + * + * \see \ref jkqtplotter_base_plotsize + */ + void setWidgetSize(QSize size); /** \brief sets the width of the plot widget *