Hi Everybody,
I am porting an application from QT3.3 to QT4.5. The Qt3.3 code use setRasterOp function to set the mode Qt::NotROP. Following is snippet of code.
{
p->translate(-contentsX(), -contentsY());
p->scale(d->Scale, d->Scale);
p->translate(-d->ViewX1, -d->ViewY1);
p->setPen(Qt::DotLine);
p->setRasterOp(Qt::NotROP); // background should not be erased
p->drawLine(..........);
}
void setPainter(QPainter *p)
{
p->translate(-contentsX(), -contentsY());
p->scale(d->Scale, d->Scale);
p->translate(-d->ViewX1, -d->ViewY1);
p->setPen(Qt::DotLine);
p->setRasterOp(Qt::NotROP); // background should not be erased
p->drawLine(..........);
}
To copy to clipboard, switch view to plain text mode
I wish to know what is substitution of Qt:NotROP in QT4. I have already tried [ p->setCompositionMode(QPainter::CompositionMode_Sour ceOut); ] which i found most close to NoTROP in Enum table. But this donot give same effect as Qt::NotROP. I am painting on viewport of Q3ScrollArea on mouse movement.
I will be thankful for your help.
Bookmarks