Can't see QwtCurve with aliceBlue color QPen
I'm using a QwtPlot based on one of the samples, with multiple curves.
When my QwtCurve is configured with a aliceblue color pen, I don't see the curve (this does not reproduce with other colors).
Would be hard to put in all the code that draws the points but here is the color related part:
Relevant header:
Code:
//! Collection of all curves in plot
Code in constructor:
Code:
setAutoReplot(false);
//! No caching
#if defined(Q_WS_X11)
// Even if not recommended by TrollTech, Qt::WA_PaintOutsidePaintEvent
// works on X11. This has a nice effect on the performance.
canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true);
canvas()->setAttribute(Qt::WA_PaintOnScreen, true);
#endif
plotLayout()->setAlignCanvasToScales(true);
grid
->setPen
(QPen(Qt
::gray,
0.0, Qt
::DotLine));
grid->enableX(true);
grid->enableXMin(true);
grid->enableY(true);
grid->enableYMin(false);
grid->attach(this);
for (int i = 0; i < objectsToPlot.count(); i++)
{
currCurve
->setPen
(QPen(objectsToPlot.
at(i
).
color));
// Here: color is aliceBlue currCurve
->setRenderHint
(QwtPlotItem::RenderAntialiased,
true);
currCurve
->setPaintAttribute
(QwtPlotCurve::ClipPolygons,
false);
currCurve->setZ(i);
currCurve->setData(new QwtPointSeriesData());
currCurve->attach(this);
mCurves.insert(objectsToPlot.at(i).combinedIndex, currCurve);
}
Re: Can't see QwtCurve with aliceBlue color QPen
aliceblue is a very bright blue. on a white background it might be almost invisible, have you tried with a dark background? can you see aliceblue in an other context (painting tool,...)? I had this once with a bright yellow which made me crazy until I found out it was the brightness of my monitor that made the color not visible...
Re: Can't see QwtCurve with aliceBlue color QPen
Thanks, when I changed the canvas background to Qt::black I saw it fine :)