MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { currLayerNumber = 0; ui->setupUi(this); ui->qwtPlot->setTitle("Error"); ui->qwtPlot->setAxisTitle(ui->qwtPlot->xBottom, "Epoch"); ui->qwtPlot->setAxisTitle(ui->qwtPlot->yLeft,"Error"); QPen pen = QPen(Qt::red); curve = new QwtPlotCurve; curve->setRenderHint(QwtPlotItem::RenderAntialiased); curve->setPen(pen); curve->attach(ui->qwtPlot); Preprocessor p; Dataset d = p.readFile("1.dat"); showResults(d); connect(ui->saveImageButton,SIGNAL(clicked()),this,SLOT(saveImage())); connect(ui->numberOfLayers,SIGNAL(valueChanged(int)),this,SLOT(changeLayers(int))); }