PDA

View Full Version : How to avoid border of QCanvas



olzzen
5th August 2010, 07:39
Hi folks,

i have a QCanvas and some observing QCanvasView's. Using Qt3.3.8.

The problem is that if the QCanvas is smaller than the QCanvasView visible area, there is a 1px border painted around the QCanvas. This border seems to be an uninitialized area which is painted in randomly colors.

I tried changing background colors in any combination of QCanvas and QCanvasView. I can't get rid of this poor border :mad:

A hint would be much much much appreciated.

Thanks
olzzen

Sorry for my bad english.

olzzen
5th August 2010, 14:55
Nobody here who has encountered and solved the explained problem?

olzzen
11th August 2010, 19:16
Hi again,

i've tried the Q3Canvas and Q3CanvasView support classes from Qt4.6.2 and the problem doesn't appear. Don't know which version of the Qt3 sources is used in these support classes.

It's a pity that nobody has a solution yet. Is seems to me that the described problem is a BUG in the Qt3 sources.

Perhaps there is at least one who can confirm this?!

greetz

olzzen
12th August 2010, 08:57
Ok, did a workaround...

In the QCanvasView::drawContents function a rect is drawn in the size of the QCanvas area with the appropriate background color.