Qt Code:
  1. MainWindow::MainWindow(QWidget *parent) :
  2. QMainWindow(parent),
  3. ui(new Ui::MainWindow)
  4. {
  5. ui->setupUi(this);
  6. QMetaObject::invokeMethod(this, "startup" , Qt::QueuedConnection);
  7. }
To copy to clipboard, switch view to plain text mode 


Qt Code:
  1. void MainWindow::startup()
  2. // Get pointer to layout manager for main window
  3. QLayout* layout = this->layout();
  4. // Add LCD screen to the main window layout at specified position
  5. LCD = new(IPR5000_LCD)(this);
  6. LCD->setGeometry(430,50,320,240);
  7. LCD->setParent(this);
  8. layout->addWidget(LCD);
  9. }
To copy to clipboard, switch view to plain text mode