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. to show a qwt3d object at somewhere specified

to show a qwt3d object at somewhere specified

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 135 Views
  • 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 Offline
    M Offline
    Make it GREAT again
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0

      • Login

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