Results 1 to 6 of 6

Thread: Plots and Layouts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    94
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Re: Plots and Layouts

    Hello,

    can you tell me, how did you manage to draw the plots within a QFrame?

    I wanted to include the spectrogram example of qwt in my programm, but nothing is displayed there:

    Qt Code:
    1. ui_frame_for_plot = qFindChild<QFrame*>(this, "frame_for_plot");
    2.  
    3. Plot *d_plot;
    4.  
    5. d_plot = new Plot(ui_frame_for_plot);
    6. d_plot->showSpectrogram(true);
    To copy to clipboard, switch view to plain text mode 

    How can I integrate a QwtPlot into another widget?

    Thank you.

    best regards,

    Vitali

  2. #2
    Join Date
    Nov 2009
    Posts
    94
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Re: Plots and Layouts

    Ok, I have solved it myself by inserting the QwtPlot into a layout:

    Qt Code:
    1. QVBoxLayout * layout_plot = new QVBoxLayout(ui_frame_for_plot);
    2.  
    3. // build object of class "Plot", which will plot the 2D surfaces
    4. d_plot = new Plot();
    5. layout_plot->addWidget(d_plot);
    6. d_plot->showSpectrogram(true);
    To copy to clipboard, switch view to plain text mode 

    Now the plot is displayed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.