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:

Qt Code:
  1. #include "mainwindow.h"
  2. #include "plot.h"
  3. #include <qwt_scale_engine.h>
  4. #include <qlabel.h>
  5. #include <qlayout.h>
  6.  
  7. MainWindow::MainWindow( QWidget *parent ):
  8. QWidget( parent )
  9. {
  10. const double intervalLength = 10.0; // seconds
  11.  
  12. d_plot = new Plot( this );
  13. d_plot->setIntervalLength( intervalLength );
  14.  
  15.  
  16. QHBoxLayout *layout = new QHBoxLayout( this );
  17. layout->addWidget( d_plot, 10 );
  18. }
  19.  
  20. void MainWindow::start()
  21. {
  22. d_plot->start();
  23. }
To copy to clipboard, switch view to plain text mode