Results 1 to 2 of 2

Thread: Copy full widget as a picture to clipboard

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Posts
    20
    Thanked 2 Times in 2 Posts

    Default Copy full widget as a picture to clipboard

    Hi,

    I need to copy widget as a picture to clipboard, to do this I use simple code

    Qt Code:
    1. QClipboard *clipboard = QApplication::clipboard();
    2. clipboard->setPixmap(QPixmap::grabWidget(MyWidget));
    To copy to clipboard, switch view to plain text mode 

    It works almost ok, It copies olny current view of widget so hidden part
    (for example not displayed part od large table) is skipped.

    Is it possible to copy full widget?

    Thx

  2. #2
    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 full widget as a picture to clipboard

    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. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. Problem with copy text to clipboard
    By weiching in forum Qt Programming
    Replies: 1
    Last Post: 22nd December 2008, 12:44
  3. How to copy QTableWidget to Clipboard
    By ranna in forum Qt Programming
    Replies: 1
    Last Post: 30th September 2008, 15:47
  4. Replies: 33
    Last Post: 8th July 2008, 07:23
  5. wait copy picture then show it
    By raphaelf in forum Newbie
    Replies: 6
    Last Post: 5th November 2006, 12:09

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.