Results 1 to 9 of 9

Thread: update a wigdet in a thread is no allow?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Aug 2009
    Posts
    28
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Re: update a wigdet in a thread is no allow?

    thanks.
    could you show me how to use the update() member function(to paint a QImage to my custom widget area)?
    it seems like no examples available....
    now i use this method:

    Qt Code:
    1. void WidgetVideoArea::paintEvent(QPaintEvent*pPaintEvent)
    2. {
    3. if(repaintme)
    4. {
    5. target.setX(0);
    6. target.setY(0);
    7. target.setWidth(width());
    8. target.setHeight(height());
    9.  
    10. painter.begin(this);
    11. painter.drawImage(target,image);
    12. painter.end();
    13.  
    14. repaintme = false;
    15. }
    16. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by lanmanck; 24th October 2009 at 06:29. Reason: have to

Similar Threads

  1. update widget from separate thread
    By method in forum Qt Programming
    Replies: 5
    Last Post: 10th July 2009, 14:33
  2. Thread Ownership Problem
    By tntcoda in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2009, 00:18
  3. Thread Help
    By tntcoda in forum Qt Programming
    Replies: 1
    Last Post: 16th January 2009, 22:10
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. Problem closing a QMainWindow in Qt4.2
    By ian in forum Qt Programming
    Replies: 11
    Last Post: 17th October 2006, 00:49

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.