This is an oscilloscope. I want a round, green window with a reticle over it.
If I were doing this directly, I'd fill a rect with black, draw a 0-alpha ellipse in it, and simply composite that over the other pixmap where the pixels where set to green after I had the scope trace drawn on the green pixmap.
It doesn't appear to work that way. I can fill the pixmap with transparency:
m_grdPixmap.fill(Qt::transparent);
and sure enough, I get a fully transparent pixmap. I can't seem to draw anything on it, even when I construct a pen with rgba. It stubbornly stays transparent.
If I do it the other way round, that is, fill it with black:
m_grdPixmap.fill(QColor::fromRgb(0, 0, 0));
Then try to draw an ellipse on it using (what I hope is a) transparent pen, it stubbornly stays opaque:
painter.setPen(qRgba(0,0,0,0));
...or...
painter.setPen(qRgba(0,0,0,255));
I'm sure I'm missing something. This should be simple, right?