Results 1 to 2 of 2

Thread: Digram not displayed.

  1. #1
    Join Date
    Mar 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Digram not displayed.

    Hi,

    I am just trying to get started with qwt. I have set up a form with a widget on it. I am trying to conect this widget to a qwt plot but the diagram is never displayed. Any idea?

    Regards,
    mikl

    Qt Code:
    1. QwtPlot *myPlot = new QwtPlot(ui->widget);
    2. // Insert new curves
    3. QwtPlotCurve *cSin = new QwtPlotCurve("y = sin(x)");
    4. cSin->setRenderHint(QwtPlotItem::RenderAntialiased);
    5. cSin->setLegendAttribute(QwtPlotCurve::LegendShowLine, true);
    6. cSin->setPen(QPen(Qt::red));
    7.  
    8. cSin->setData(new FunctionData(::sin));
    9.  
    10. cSin->attach(myPlot);
    11.  
    12. myPlot->replot();
    To copy to clipboard, switch view to plain text mode 
    Edit: Could it be myPlot->show() that is needed? (Want to go home testing)
    Last edited by mikl; 11th March 2011 at 14:11.

  2. #2
    Join Date
    Mar 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Digram not displayed.

    Show did the trick!

Similar Threads

  1. 's' is displayed instead of 'σ'
    By babygal in forum Newbie
    Replies: 7
    Last Post: 21st October 2010, 21:48
  2. No checkboxes are displayed in a QTableView
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 15th October 2010, 17:28
  3. image not displayed ...
    By sh123 in forum Qt Tools
    Replies: 4
    Last Post: 15th December 2008, 13:07
  4. StatusTip remains displayed
    By emonette123 in forum Qt Programming
    Replies: 0
    Last Post: 4th April 2008, 16:32
  5. SplashScreen isn't displayed
    By Salazaar in forum Newbie
    Replies: 26
    Last Post: 27th June 2007, 21:14

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.