Results 1 to 2 of 2

Thread: Draw contents of widget in another widget

  1. #1
    Join Date
    Jul 2007
    Posts
    6
    Thanks
    2

    Default Draw contents of widget in another widget

    Is possible “to draw” the contents of one widget in another one widget? How to make?

  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: Draw contents of widget in another widget

    Yes.
    If you have widgets w1 and w2, and you want to draw w1 on w2 then you can use:
    Qt Code:
    1. QPixmap w1Pix = QPixmap::grabWidget(w1);
    To copy to clipboard, switch view to plain text mode 
    Now you have the contents of w1 in w1Pix.
    Nett you can use any means to draw this pixmap on to w2.

    Regards

  3. The following user says thank you to marcel for this useful post:

    hashb (28th May 2012)

Similar Threads

  1. Rotation problem trying to draw a compass widget
    By yellowmat in forum Qt Programming
    Replies: 2
    Last Post: 18th February 2007, 19:03
  2. Drawing over content widgets? (overlay)
    By sertrem in forum Qt Programming
    Replies: 2
    Last Post: 17th January 2006, 22:18

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.