Results 1 to 2 of 2

Thread: Substitute of Qt::NotROP in QT4.5

  1. #1
    Join Date
    Jun 2009
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Post Substitute of Qt::NotROP in QT4.5

    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.

    Qt Code:
    1. void setPainter(QPainter *p)
    2. {
    3. p->translate(-contentsX(), -contentsY());
    4. p->scale(d->Scale, d->Scale);
    5. p->translate(-d->ViewX1, -d->ViewY1);
    6. p->setPen(Qt::DotLine);
    7.  
    8. p->setRasterOp(Qt::NotROP); // background should not be erased
    9.  
    10. p->drawLine(..........);
    11. }
    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Substitute of Qt::NotROP in QT4.5

    There is no simple substitution. The concept of painting in Qt4 has changed and you shouldn't try to paint outside the paint event, if that's what you are doing.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.