سؤال

I have changed the cursor on a QGraphicsView using:

graphicsView->setCursor(QCursor(Qt::CrossCursor));

but I don't want the cursor to change on scrollbars of this graphicsView.

Any idea on how to do?

هل كانت مفيدة؟

المحلول

This should do the trick:

graphicsView->verticalScrollBar()->setCursor(QCursor(Qt::ArrowCursor));
graphicsView->horizontalScrollBar()->setCursor(QCursor(Qt::ArrowCursor));
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top