I want my Prebuilt application LogDisplay to be integrate with my other application
-
Hi, Below is my new GUI appliation design:

The Box selected below is QStack and is placed upon QWidget.
And my prebuilt application is based on QPlainText.
I Already Promoted to QStack to LogDisplay class.
But facing some errors with UI implementation:#include "simulatormain.h" #include "ui_simulatormain.h" #include "logdisplay.h" #include<QVBoxLayout> SimulatorMain::SimulatorMain(QWidget *parent) : QMainWindow(parent) , ui(new Ui::SimulatorMain) { LogDisplay* logDisplay = new LogDisplay(this); // create LogDisplay widget QVBoxLayout* layout = new QVBoxLayout(); // create a vertical layout layout->addWidget(logDisplay); // add LogDisplay widget to the layout setCentralWidget(logDisplay); // set the central widget setLayout(layout); // set the layout on the central widget ui->setupUi(this); } SimulatorMain::~SimulatorMain() { delete ui; } void SimulatorMain::on_stackedWidget_currentChanged(int arg1) { }Error Im getting now is: addWidget is not a member of LogDisplay
Please help! -
Hi, Below is my new GUI appliation design:

The Box selected below is QStack and is placed upon QWidget.
And my prebuilt application is based on QPlainText.
I Already Promoted to QStack to LogDisplay class.
But facing some errors with UI implementation:#include "simulatormain.h" #include "ui_simulatormain.h" #include "logdisplay.h" #include<QVBoxLayout> SimulatorMain::SimulatorMain(QWidget *parent) : QMainWindow(parent) , ui(new Ui::SimulatorMain) { LogDisplay* logDisplay = new LogDisplay(this); // create LogDisplay widget QVBoxLayout* layout = new QVBoxLayout(); // create a vertical layout layout->addWidget(logDisplay); // add LogDisplay widget to the layout setCentralWidget(logDisplay); // set the central widget setLayout(layout); // set the layout on the central widget ui->setupUi(this); } SimulatorMain::~SimulatorMain() { delete ui; } void SimulatorMain::on_stackedWidget_currentChanged(int arg1) { }Error Im getting now is: addWidget is not a member of LogDisplay
Please help!@Aviral-0 said in I want my Prebuilt application LogDisplay to be integrate with my other application:
LogDisplay* logDisplay = new LogDisplay(this); // create LogDisplay widget
QVBoxLayout* layout = new QVBoxLayout(); // create a vertical layout
layout->addWidget(logDisplay); // add LogDisplay widget to the layout
setCentralWidget(logDisplay); // set the central widget
setLayout(layout); // set the layout on the central widgetHi,
Hard to figure out what you want to do here.
Anyway, all of this will be overwritten by the next line:
ui->setupUi(this);