vonCZ
16th May 2009, 15:16
I have a QScrollArea with a 4,000-pixel (height), custom-painted widget on it. But the actual part of the widget displayed at any given time is more like 400 pixels. How can I determine this number exactly?
I've tried:
myScrollArea->height();
and
QRegion treg = myScrollArea->visibleRegion();
QRect trect = tregion.boundingRect();
qDebug(" height = %d", trect.height() );
The first returns "480" (though that's not correct), and the 2nd returns 0. Ideas?
I've tried:
myScrollArea->height();
and
QRegion treg = myScrollArea->visibleRegion();
QRect trect = tregion.boundingRect();
qDebug(" height = %d", trect.height() );
The first returns "480" (though that's not correct), and the 2nd returns 0. Ideas?