When I Scroll a widget in QScrollArea, its scrollbar's step is not singleStep() but singleStep() * 3.
I set singleStep of QScrollArea's verticalScrollBar() to 30 in order to scroll 30 per scroll, but it scrolls 90 per scroll.
MyScrollArea::MyScrollArea(QWidget* parent) : QScrollArea(parent) {
this->verticalScrollBar()->setSingleStep(30); // set singleStep to 30
connect(this->verticalScrollBar(), SIGNAL(valueChanged(int)),
this, SLOT(on_valuechange(int)));
}
MyScrollArea::on_valuechange(int i) {
qDebug() << i; // always 90n, not 30n
}
or is this just the problem with my mouse?