How are you populating the QwtPlot with data? I assume that it is used
somewhere within TemperaturePlot, but I don't see anywhere that you're
giving it any data to graph. I'm not positive how it behaves, but that
might cause it to show up blank. Seeing how you're using the QwtPlot
might help too, so posting that relevant code is probably a good idea.
If you haven't already, I'd suggest checking out
http://qwt.sourceforge.net/class_qwt_plot.html . There are a number of
things you need to do to get a QwtPlot to display correctly, and they have
an example there that helped me get my Qwt and QT program working.
> I am writing a data acquisition program. I want to draw the output with
> the QwtPlot class. However, the output is blank. Here is my main()
> function, what' wrong with it.
> int main(int argc, char **argv)
> QApplication a(argc, argv);
> QWidget mywidget;
> TemperaturePlot *tempplot = new TemperaturePlot((const QString &)"0",
> &mywidget, (const char *)0);
> return a.exec();
> If I add "tempplot->show();" in it, it will show 2 widgets separately.
> What can I do. Thanks.
> List archive and information: http://lists.trolltech.com/qt-interest/
List archive and information: http://lists.trolltech.com/qt-interest/