Qt6 topics merged with General

to show a qwt3d object at somewhere specified

  • Hello,
    I want to use GridPlot to show points given by serial port data. I tried duplicating a demo and re-configure its project as a single project. That works well but don't know how I can show it in another UI.
    For example, the object is declared as a member of TestGUI inheritted from QMainWindow
    #include <QMainWindow>
    #include "difplot.h" // given simply qwt3d plot things

    namespace Ui {
    class TestGui;

    class TestGui : public QMainWindow

    explicit TestGui(QWidget *parent = 0);

    Ui::TestGui *ui;

    Qwt3D::GridPlot * oPlot;

    #endif // TESTGUI_H

    What I can do to show it in TestGui.cpp if the main.cpp given as
    #include "testgui.h"
    #include <QApplication>

    int main(int argc, char *argv[])
    QApplication a(argc, argv);
    TestGui w;

    return a.exec();


  • Lifetime Qt Champion


    Does TestGui contain a layout ? If so just add your plot widget to that layout.

Log in to reply