[Qt-interest] QPixmap z order....

OS Prog osprog at gmail.com
Mon Nov 2 16:19:03 CET 2009


Hi,

I'm drawing two pixmaps in a widget like
void MyWidget::paintEvent(QPaintEvent *event)
{
    NOT_USED(event);
    QPainter p(this);
    p.drawPixmap(0, 0, (const QPixmap &)*pixmap1);
    p.drawPixmap(0, 0, (const QPixmap &)*pixmap2);
}

What I expect is the 'pixmap2' to be 'over' 'pixmap1' (as it is drawn last),
but it looks like 'pixmap1' is on the top.

Why that happens?

Best regards,
Nikolay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091102/91a53950/attachment.html 


More information about the Qt-interest-old mailing list