<p>Dear Stacktoverflow, can you show me an example of how to use a QScrollBar? Thanks.</p>

It will come down to you using the QScrollArea, it is a widget that implements showing something that is larger than the available space. You will not need to use QScrollBar directly. I don't have a PyQt example but there is a C++ example in the QT distribution it is called the "Image Viewer". The object hierarchy will still be the same