QCustomPlot Discussion and Comments

I have trouble plotting multiple datapoints using QCPCurveReturn to overview

Hello!
I would like to plot multiple datapoints to my widget using QCustomPlot.
The graph they will resemble will have multiple y-Values assigned to the same x-value, which is why using "Graph" did not get me anyhwere.
Initially, I defined a QVector whose values I plotted through

ui->customPlot->graph(0)->setData(x,y);

However - as I said - this doesn't help me since I need to be able to manually control the order of connection of points.

After research I learned that I need to use QCPCurve by defining:

QCPCurve *newCurve = new QCPCurve(ui->plot->xAxis, ui->plot->yAxis); (1)
ui->customPlot->addPlottable(this->newCurve); (2)

Allegedly I should now be able to plot the points by using a QVector as I was used to do it using "Graph" by writing:
this->newCurve->setData(x, y);

The problem I have is that line (2) and (3) give me the the following error messages:

'class QCustomPlot' has no member named 'addPlottable'; did you mean 'hasPlottable'?
'class MainWindow' has no member named 'newCurve'
unused variable 'new Curve' [-Wunused-variable]
'class MainWindow' has no member named 'newCurve'

Every thread I searched simply stated that I have to implement these three lines (1) (2) (3).
I think that my problem lies in needing to define the Plottable for QCP or sth like that.
I am a complete beginner and all these things do not say anything to me..

I will attach my code below so you have more information, can anyone explain me what the nature of the problem is?

#include "mainwindow.h"
#include "ui_mainwindow.h"


MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QCPCurve *newCurve = new QCPCurve(ui->plot->xAxis, ui->plot->yAxis);

     ui->plot->addPlottable (this->newCurve);

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_btn_start_clicked()
{
QVector<double> x(1),y(1);
x[0] = 1;
y[0] = 2;

this->newCurve->setData(x,y);
}

this->newCurve = new QCPCurve(ui->plot->xAxis, ui->plot->yAxis);
ui->plot->addPlottable (this->newCurve);

Unfortunately this doesn't solve the problem. I still get:

'class Mainwindow' has no member named 'new Curve'
'class QCustomPlot' has no member named 'addPlottable'; did you mean 'hasPlottable'?
'class MainWindow' has no member named 'newCurve'