Your code is awfully slow as you are drawing on an image only to convert it to a pixmap. One thing to optimize is to draw immediately on a pixmap. Another is to redraw only this portion of the pixmap that actually needs redrawing. It would probably be a wise thing to have the whole wave pregenerated into a pixmap and only copy part of the rendering into another pixmap that will be set on the label (or simply use QScrollArea with the pregenerated pixmap set onto a label). This all should help but honestly your label shouldn't be going black regardless of the speed of your code. If it does, there is probably some logical error in the code causing a black pixmap to be created and rendered onto the label before the proper pixmap is generated.