Results 1 to 6 of 6

Thread: how to draw a widget on another widget?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2009
    Posts
    74
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default how to draw a widget on another widget?

    suppose I have a widget ,say, QTextEdit, it already has some corresponding attributes: text, font, color, ....
    I want to draw it onto a widget of my own

    how can I achieve that?

    //mywidget.h
    class MyWidget : public QWidget
    ...

    //mywidget.cpp
    void MyWidget :: paint()
    {
    //???
    }
    Last edited by hashb; 28th May 2012 at 06:14.

Similar Threads

  1. Draw Custom widget
    By deepal_de in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2011, 07:27
  2. Draw a line between widget and mouse?
    By AyaKoshigaya in forum Qt Programming
    Replies: 6
    Last Post: 26th April 2010, 06:32
  3. Draw transparent SVG in Background of Widget
    By soul_rebel in forum Qt Programming
    Replies: 0
    Last Post: 28th October 2008, 20:44
  4. Replies: 5
    Last Post: 18th March 2008, 16:11
  5. Draw contents of widget in another widget
    By gustavosbarreto in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 14:43

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