I can't give you a complete 10 line sample. I can tell you it is just like any ordinary widget with exception that at each time you only see part of it and the part seen is manipulated using QAbstractScrollArea::scrollContentsBy() that you will need to implement.
Why I can not inherits from QScrollArea instead of QAbstractScrollArea?
Bookmarks