Results 1 to 3 of 3

Thread: How to save the image in clipboard in variable and restore it to clipboard later?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to save the image in clipboard in variable and restore it to clipboard later?

    If you want inter-operability with non-Qt apps, like MS Paint, then you need to convert your image into one of the "standard" MIME types, like image/jpg or image/bmp. There is a complete list here. This will probably require saving your QImage into one of these image types before pasting it.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. #2

    Default Re: How to save the image in clipboard in variable and restore it to clipboard later?

    Quote Originally Posted by d_stranz View Post
    If you want inter-operability with non-Qt apps, like MS Paint, then you need to convert your image into one of the "standard" MIME types, like image/jpg or image/bmp. There is a complete list here. This will probably require saving your QImage into one of these image types before pasting it.
    When I press the Print-Screen key to take a screenshot, the only format I got is "application/x-qt-image". I do not know what the standard mime is for the image in the clipboard, how can I convert to a standard mime type?

Similar Threads

  1. QtCreator unable to copy to the clipboard...
    By squimmy in forum Qt Tools
    Replies: 4
    Last Post: 25th December 2012, 12:53
  2. copy - paste clipboard contents
    By viswanathan in forum Newbie
    Replies: 1
    Last Post: 8th January 2010, 12:10
  3. How to copy QTableWidget to Clipboard
    By ranna in forum Qt Programming
    Replies: 1
    Last Post: 30th September 2008, 15:47
  4. Help needed re: clipboard detection
    By sdfisher in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2007, 00:45
  5. QApplication::clipboard not read textCursor cut
    By patrik08 in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2007, 22:17

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.