Problème d'affichage de la grille avec QwtPlot
Bonjour à tous,
j'essaye d'afficher une grille dans un QwtPlot, mais en vain.
Je vous mets mes sources afin d'analyser le problème :
Dans la classe du MainWindow
Dans la fonction MainWindow
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
AxCurve = new QwtPlot(this);
AxCurve->setGeometry(10, 380, 400, 200);
AxCurve->setCanvasBackground( Qt::white );
AxCurve->setAxisTitle( QwtPlot::yLeft, "Ax (g)" );
AxCurve->setAxisTitle( QwtPlot::xBottom, "Time (ms)" );
AxCurve->setAxisScale( QwtPlot::yLeft, -2.0, 2.0 );
AxCurve->setAxisScale( QwtPlot::xBottom, 0, 100 );
QwtPlotGrid myGrid;
myGrid.enableX(true); <-- Demande d'afficher la grille en X
myGrid.enableY(true); <-- Demande d'afficher la grille en Y
myGrid.attach(AxCurve);
AxCurve->replot();
AxCurve->show(); |
Merci d'avance