Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. DrawPixmap slower in QT 4.7.1
Qt 6.12 LTS is out! See what's new in the release blog

DrawPixmap slower in QT 4.7.1

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I recently updated my version of QT from 4.4.3 to 4.7.1 hoping to see an improvement in performance. Instead the drawing speed of my program got even slower. Has anyone encountered a similar issue? Any suggestions to improve performance?

    My program is drawing a scrolling image using a QGraphicsScene and one QGraphicsItem which contains the code for advancing the image. In the advance function for the QGraphicsItem, I draw onto an offscreen pixmap, and draw that pixmap to the screen in the paint function.

    Below is some sample code to give a general idea what I am trying to do:

    @
    void MyQGraphicsItem::advance( int phase )
    {
    pixmap_painter->drawPixmap(0, 1, offscreen_pixmap); // draw the last pixmap shifted down by one
    /
    read in the next line of the image into a QImage of height 1 */
    pixmap_painter->drawImage(0, 0, myQImage);
    }

    void MyQGraphicsItem::paint( QPainter *painter, const QStyleOptionsGraphicsItem * option, QWidget * widget)
    {
    painter->drawPixmap(0, 0, *offscreen_pixmap);
    }
    @

    [EDIT: code formatting - please use @-tags, Volker]

    1 Reply Last reply
    0
    • W Offline
      W Offline
      w00t
      wrote on last edited by
      #2

      Can you post a full testcase so it can be built and run through a profiler?

      --
      http://rburchell.com

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved