Thank you very much for your feedback ...

yes, keeping QGV is required for other features of the complete code.

I try the following without success ...

Qt Code:
  1. //Same as before
  2. scene = new QGraphicsScene(this);
  3. view = new QGraphicsView();
  4. view->setScene(scene);
  5. setCentralWidget(view);
  6.  
  7.  
  8. // Create a QWTPLOT
  9. QwtPlotCurve* m_curve= new QwtPlotCurve;
  10.  
  11. QwtPlot* testhidden = new QwtPlot;
  12. testhidden->setHidden(TRUE); //Hide the plot
  13. testhidden->setTitle("QwtPlotWidget");
  14. testhidden->setAxisTitle(QwtPlot::yLeft,"Y");
  15. testhidden->setAxisTitle(QwtPlot::xBottom,"X");
  16.  
  17. // Calculate some fake curve
  18. double xxval[10000];
  19. double yyval[10000];
  20. for(int i=0; i<10000;i++)
  21. {
  22. xxval[i] = i;
  23. yyval[i] = qSin(xxval[i]) * qCos(2.0 * xxval[i]) * 100 +101;
  24. }
  25.  
  26. //
  27. // attach
  28. m_curve->setRawSamples(xxval, yyval,250);
  29. m_curve->attach(testhidden);
  30.  
  31. testhidden->show(); // Not sure if needed
  32.  
  33.  
  34. //QT pixmap and rendering
  35. pixmapItem = new QGraphicsPixmapItem();
  36. scene->addItem(pixmapItem);
  37.  
  38. QPixmap tmp;
  39. QwtPlotRenderer* plotrend = new QwtPlotRenderer;
  40. plotrend->renderTo(testhidden,tmp);
  41.  
  42. //show the pixmap
  43. pixmapItem->setPixmap(tmp);
  44. // It compiles but fails to show the plot 8blank window) ...
To copy to clipboard, switch view to plain text mode 


Is it what you meant ? or did I miss something ?

Val