Results 1 to 11 of 11

Thread: Why is my application's CPU usage always > 50%

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Why is my application's CPU usage always > 50%

    What do you use the setPixmap call for in the paint event? You should never do that. If all you want is to change the pixmap to some other pixmap then do it when the actual change happens - use setPixmap() then and it will call update() which will call your paint event.
    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.


  2. #2
    Join Date
    Dec 2008
    Posts
    23
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Why is my application's CPU usage always > 50%

    Thanks.. I see your point.. What I need is another method to do what I now have paintEvent do... then just call this new method when I need to update. Seems easy now.. didn't seem easy before :-) .. Thanks again.

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.