1 Attachment(s)
QwtPlot rendering when disabled
Qwt 6.0.3, Qt 4.8.4, Linux.
I was expecting this code to generate a disabled widget (it does) with the plot title, legend, and maybe plot curves, ghosted (it does not). The scales and their labels get ghosted. Am I missing something or is this a "feature"?
Code:
#include <QtGui>
#include "qwt_plot.h"
#include <qwt_plot_curve.h>
#include <qwt_legend.h>
static const double x[] = { 0.0, 1.0, 2.0, 3.0 };
static const double y[] = { 0.0, 1.0, 4.0, 9.0 };
int main(int argc, char **argv)
{
myPlot.setTitle("Test");
myPlot.
setAxisTitle( QwtPlot::xBottom,
"X" );
myPlot.
setAxisTitle( QwtPlot::yLeft,
"Y" );
myPlot.
insertLegend( legend,
QwtPlot::BottomLegend );
curve
->setPen
(QColor(Qt
::red));
curve->setSamples(x, y, 4);
curve->attach(&myPlot);
myPlot.setEnabled(false);
myPlot.show();
return app.exec();
}
Attachment 8921