You can just add the QCustomPlots in code.
But I don't need an object. I want just to plot and I do it using QCustomPlots on widget. I do not understand how to connect the new window with QCustomPlot without using Qt Designer Form in order to be able to plot on the new Window.
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(ok,SIGNAL(clicked(bool)),SLOT(Born()));
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::Born()
{
//how to plot here using QCustomPlot?
// NewWindow->setLayout();
NewWindow->show();
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QPushButton *ok = new QPushButton("Create new!",this) ;
connect(ok,SIGNAL(clicked(bool)),SLOT(Born()));
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::Born()
{
QMainWindow *NewWindow=new QMainWindow;
//how to plot here using QCustomPlot?
// NewWindow->setLayout();
NewWindow->show();
}
To copy to clipboard, switch view to plain text mode
Bookmarks