Results 1 to 12 of 12

Thread: copy QPainter content to a QImage

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: copy QPainter content to a QImage

    So is the source device a QWidget or QImage or what? Do you understand the question I am asking?
    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.


  2. #2
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: copy QPainter content to a QImage

    you want me to casting paintingdevice?
    i m sure its not qwidget its qimage or qpixmap or qbitmap i dont know exactly what is that!

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

    Default Re: copy QPainter content to a QImage

    Quote Originally Posted by danics View Post
    you want me to casting paintingdevice?
    I'm asking you to look into the source code of the application you are maintaining and see what is the source device for the call being made.

    i m sure its not qwidget its qimage or qpixmap or qbitmap i dont know exactly what is that!
    So check. If it's QImage or QPixmap (or QBitmap which is its subclass) then you can use QImage::copy() or QPixmap::copy().
    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.


  4. #4
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: copy QPainter content to a QImage

    if i wanna do this i must check so much code, and change so many functions for referencing that object too, if i have only QPainterDevice i cannot do anything?

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

    Default Re: copy QPainter content to a QImage

    Quote Originally Posted by danics View Post
    if i wanna do this i must check so much code,
    Well, I'm sorry. The alternative is to rewrite the whole program from scratch. Use a search tool to help you.
    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.


Similar Threads

  1. QImage copy
    By paolom in forum Qt Programming
    Replies: 4
    Last Post: 10th February 2011, 05:59
  2. QPainter(&QPrinter) & QPainter(&QImage) communication
    By gufeatza in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2010, 07:25
  3. How to get the content of a QImage ?
    By fitzy in forum Qt Programming
    Replies: 4
    Last Post: 29th October 2009, 15:47
  4. how to copy QString content into array
    By eric in forum Qt Programming
    Replies: 12
    Last Post: 14th November 2007, 23:13
  5. copy-paste the content of a QTable
    By greencastor in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2006, 12:20

Tags for this Thread

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.