Hi,
In Qt3 the QScrollView class had setContentsPos method, using it I as able to move the contents. I want to find a substitute of this in Qt4. I did think the scrollContentsBy method has the similar sense, but it does update the contents only. I need some method which move the contents in the scroll area.
I tried to use :
scrollArea->scrollContentBy(dx, dy); // does not work
scrollArea->viewport()->scroll(dx, dy); // It does move the contents, but does not update values of scrollbars.
scrollArea->widget()->move(widget()->x() + dx, widget()->y() + dy); // same like viewport()->scroll(dx, dy)
scrollArea->scrollContentBy(dx, dy); // does not work
scrollArea->viewport()->scroll(dx, dy); // It does move the contents, but does not update values of scrollbars.
scrollArea->widget()->move(widget()->x() + dx, widget()->y() + dy); // same like viewport()->scroll(dx, dy)
To copy to clipboard, switch view to plain text mode
The question is: in what way I can reproduce the behaviour of Qt3's QSrollView::setContentsPos in Qt4?
Bookmarks