Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I want my Prebuilt application LogDisplay to be integrate with my other application
Forum Updated to NodeBB v4.3 + New Features

I want my Prebuilt application LogDisplay to be integrate with my other application

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 184 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Aviral 0A Offline
    Aviral 0A Offline
    Aviral 0
    wrote on last edited by
    #1

    Hi, Below is my new GUI appliation design:
    Screenshot 2023-02-16 230436.jpg
    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!

    M 1 Reply Last reply
    0
    • Aviral 0A Aviral 0

      Hi, Below is my new GUI appliation design:
      Screenshot 2023-02-16 230436.jpg
      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!

      M Offline
      M Offline
      mpergand
      wrote on last edited by
      #2

      @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 widget

      Hi,
      Hard to figure out what you want to do here.
      Anyway, all of this will be overwritten by the next line:
      ui->setupUi(this);

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved