Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved to show a qwt3d object at somewhere specified

    General and Desktop
    2
    2
    33
    Loading More Posts
    • 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.
    • M
      Make it GREAT again last edited by

      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
      {
      Q_OBJECT

      public:
      explicit TestGui(QWidget *parent = 0);
      ~TestGui();

      private:
      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;
      w.show();

      return a.exec();
      

      }

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post