Results 1 to 3 of 3

Thread: Any option for QPainter::setRasterOp( ) in Qt 4.2.2

  1. #1
    Join Date
    Feb 2006
    Posts
    157
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Any option for QPainter::setRasterOp( ) in Qt 4.2.2

    Hi guys,

    Our team is trying to port our application from qt3.4.4 to Qt 4.2.2. The existing one is a drawing application ( Qt3.3.4) , which will draw objects ( say Line, rectangle..etc ) in Qframe.and everything is wroking perfectly in Qt3.x.

    Now the problem is, in Qt3.x we were using
    Qt Code:
    1. Qpainter::setRasterOp( )
    To copy to clipboard, switch view to plain text mode 
    to get a clear drawned object . but while poting to Qt 4.2.2 , there is no such option like "setRasterOp( )"

    Could you please let me know any option to enable " RasterOperation " in Qt 4.2.2 .

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Any option for QPainter::setRasterOp( ) in Qt 4.2.2

    You can take a look at QPainter::setCompositionMode().
    Note that it only works when the paint device is a QImage. More info in Assitant.

    Regards

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Any option for QPainter::setRasterOp( ) in Qt 4.2.2

    There is no replacement for the XOR mode in Qt4. Whatever solution you like to implement in Qt4, erasing of the lines, rectangles (rubberbands) always needs a repaint of the widget !

    And yes, the performance is worse and it might be difficult to get things flicker free. As an example you might have a look at http://qwt.sf.net. F.e. in the bode example you can see a rubberband in action with Qt4.

    HTH,
    Uwe

Similar Threads

  1. using the lib template dll option on *nix
    By jamadagni in forum Qt Programming
    Replies: 3
    Last Post: 19th April 2007, 13:14
  2. Virtual Memory in Qt 4.2.2
    By Shuchi Agrawal in forum Newbie
    Replies: 3
    Last Post: 5th March 2007, 23:38
  3. QT 4.2.2 and Ico plugins
    By Placido Currò in forum Qt Programming
    Replies: 2
    Last Post: 24th January 2007, 15:13
  4. QGLWidget with multiple monitors
    By Rayven in forum Qt Programming
    Replies: 3
    Last Post: 4th August 2006, 10:28

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
  •  
Qt is a trademark of The Qt Company.