qt-interest@trolltech.com
[Top] [All Lists]

Re: [Qt 4.1-rc1] Drawing pixmap onto QScrollArea

Subject: Re: [Qt 4.1-rc1] Drawing pixmap onto QScrollArea
From: Paul Miller
Date: Wed, 23 Nov 2005 14:20:24 -0600
Falko Buttler wrote:
Paul Miller schrieb:

Falko Buttler wrote:

I have found out, that it is impossible with Qt 4.1.0-rc1 to draw pixmaps onto a QScrollarea. In the paintEvent-method I am drawing a little pixmap onto the area but it is not visible. With Qt 4.0.1 this works fine. If I change the inheritted class from QScrollbar to QFrame the pixmap is drawn!

Are you setting the contents size?

I only use the drawPixmap function with parameters x, y, width and heigth.

You need to set the contentsSize of the QScrollArea - otherwise it doesn't know how big your scrollable region is. If the contents size defaults to 0,0 (I don't know what the default is), then it wouldn't show anything.




--
Paul Miller | paul@xxxxxxxxxx | www.fxtech.com | Got Tivo?

<Prev in Thread] Current Thread [Next in Thread>