I've spent a few hours looking, but I've found nothing.
I already know how to do all the basic stuff via coding in c++, but I'm trying to figure out how to do this using the Qt Creator Design tab.
Steps I do so far:
1) Open my project from Qt Creator
2) Open my mainwindow.ui file which takes me to the design tab
3) drag and drop a Qwt Plot widget onto my form
4) ?
As I said, I've already got my program working by using the following mainwindow code (that does not use a ui file), but I want to figure out how to do this from the Qt Creator Designer tab.
Current working non-ui mainwindow.cpp code:
#include "mainwindow.h"
#include "plot.h"
#include <qwt_scale_engine.h>
#include <qlabel.h>
#include <qlayout.h>
MainWindow
::MainWindow( QWidget *parent
):{
const double intervalLength = 10.0; // seconds
d_plot = new Plot( this );
d_plot->setIntervalLength( intervalLength );
layout->addWidget( d_plot, 10 );
}
void MainWindow::start()
{
d_plot->start();
}
#include "mainwindow.h"
#include "plot.h"
#include <qwt_scale_engine.h>
#include <qlabel.h>
#include <qlayout.h>
MainWindow::MainWindow( QWidget *parent ):
QWidget( parent )
{
const double intervalLength = 10.0; // seconds
d_plot = new Plot( this );
d_plot->setIntervalLength( intervalLength );
QHBoxLayout *layout = new QHBoxLayout( this );
layout->addWidget( d_plot, 10 );
}
void MainWindow::start()
{
d_plot->start();
}
To copy to clipboard, switch view to plain text mode
Bookmarks