QScrollBar* scrollBar = new QScrollBar(Qt::Horizontal, this); scrollBar->setPageStep(10);
QScrollBar* scrollBar = new QScrollBar(Qt::Vertical, this); scrollBar->setPageStep(50);In this example, a vertical scroll bar is created with a page step of 50. This means that when the user clicks on the scroll bar's "page up" or "page down" button, the scroll bar will move by 50 steps. Package library: Qt GUI library.