Hello everyone! I have a special class for building graphs, but when i want to add it on scrollArea, i have some issues. Graphs are very small and if i want to print 50 graphs, i will see something like that: "They are pressed against each other and nothing is visible, but i want each graph to be with normal height and stretch across the entire width of the screen.

Graph class

#include "graphbuilder.h"

GraphBuilder::GraphBuilder(QWidget* parent)
    : QWidget(parent)
    _customPlot = new QCustomPlot(this);

    delete _customPlot;

void GraphBuilder::build(QMap<QString, QVector<double>>& position, const QString& header, const QVector<QTime>& time)
    QVector<double> timeData;
    QVector<double> positionData;

    for (int i = 0; i < time.size(); ++i)

    positionData = position[header];

    _customPlot->graph()->setData(timeData, positionData);

    QSharedPointer<QCPAxisTickerDateTime> dateTicker(new QCPAxisTickerDateTime);

    QCPTextElement *title = new QCPTextElement(_customPlot);
    title->setFont(QFont("sans", 12, QFont::Bold));
    _customPlot->plotLayout()->addElement(0, 0, title);

    _customPlot->setInteraction(QCP::iRangeZoom, true);
    _customPlot->setInteraction(QCP::iRangeDrag, true);

    _customPlot->setFixedSize(1200, 900);
//    _customPlot->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);

void MainWindow::printGraph()
    QMap<QString, QVector<double>> position = controller->getPosition();
    // qDebug() << position;
    QStringList headers = controller->getHeaders();
    // qDebug() << headers;
    QVector<QTime> time = controller->getTime();
    // qDebug() << time;
    for (int i = 0; i < 50; ++i)
        GraphBuilder* graph = new GraphBuilder();
        graph->build(position, headers[3], time);