Results 1 to 6 of 6

Thread: PaintEvent - interupt paint

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default PaintEvent - interupt paint

    Hello,
    I have a question regarding interruption of paint in paintEvent() / QPainter.

    Basically what I want to achieve is stop / interrupting paint of QImage / QPixmap by QPainter.

    What I do now is, in paintEvent() I paint QImage by QPainter. Everything works fine but I want to interrupt paint process so it would work like this:
    - I paint current image next image paint is requested and I want interrupt paint and start painting next image.

    My current "workflow" for image paint:
    - [another thread] -> read image
    - signal / slot to paint widget
    - [main thread] paint widget in paintEvent by QPainter paints image
    - user now can request another image so load do starts but now there is a "lag" because next image paint is started when current image is painted on.

    to draw image I use .drawImage / .drawPixmap functions

    Is there a way to achieve that?

    Thanks in advance for reply.
    Last edited by Talei; 9th March 2014 at 18:57.
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

Similar Threads

  1. qt paintEvent
    By lzpmail in forum Qt Programming
    Replies: 2
    Last Post: 1st April 2011, 13:13
  2. Replies: 1
    Last Post: 24th March 2011, 14:38
  3. paintEvent help
    By seltra in forum Newbie
    Replies: 11
    Last Post: 18th September 2010, 19:24
  4. QGraphicsScene in paintEvent ?
    By PLan2010 in forum Newbie
    Replies: 5
    Last Post: 14th June 2010, 12:16
  5. How to paint a widget outside paintEvent()
    By wesley in forum Qt Programming
    Replies: 10
    Last Post: 27th February 2008, 03:19

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.