- verticalScrollBar->setValue(value + m_scrollInc);
-
- if (m_rubberBandSelection) {
- // The scrolling does not lead to an update of the rubberband
- // selection. Fake a mouse move event to let the QAbstractItemView
- // update the rubberband.
- QWidget* viewport = m_itemView->viewport();
- const QPoint pos = viewport->mapFromGlobal(QCursor::pos());
- QMouseEvent event(QEvent::MouseMove, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
- QCoreApplication::sendEvent(viewport, &event);
- }
+ verticalScrollBar->setValue(value + m_verticalScrollInc);
+
+ }
+ QScrollBar* horizontalScrollBar = m_itemView->horizontalScrollBar();
+ if (horizontalScrollBar != 0) {
+ const int value = horizontalScrollBar->value();
+ horizontalScrollBar->setValue(value + m_horizontalScrollInc);
+
+ }
+
+ if (m_rubberBandSelection) {
+ // The scrolling does not lead to an update of the rubberband
+ // selection. Fake a mouse move event to let the QAbstractItemView
+ // update the rubberband.
+ QWidget* viewport = m_itemView->viewport();
+ const QPoint pos = viewport->mapFromGlobal(QCursor::pos());
+ QMouseEvent event(QEvent::MouseMove, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QCoreApplication::sendEvent(viewport, &event);