Bilbon
11th October 2006, 13:01
I have a nasty problem with QScrollArea.
I draw a document where the width / height ratio is constant. The document has a zoom factor.
I use in widget() the function minimumSizeHint() which give back conforming of the document zoom factor and the parentWidget()->size() the new document size. Because of the fit to width the document size is the same than the parent widget size.
Ok until now all seems ok!
But, if the widget size is too big the document will switch on the vertical scrollbar. But the new widget size (with the vertical scroller) could draw a smaller document which one is enough small to fit in the widget, now the vertical scroll will switch off ... and so on ...
Any one has an idea how to do it ?
Bilbon.
I draw a document where the width / height ratio is constant. The document has a zoom factor.
I use in widget() the function minimumSizeHint() which give back conforming of the document zoom factor and the parentWidget()->size() the new document size. Because of the fit to width the document size is the same than the parent widget size.
Ok until now all seems ok!
But, if the widget size is too big the document will switch on the vertical scrollbar. But the new widget size (with the vertical scroller) could draw a smaller document which one is enough small to fit in the widget, now the vertical scroll will switch off ... and so on ...
Any one has an idea how to do it ?
Bilbon.