Important: Please read the Qt Code of Conduct -

QScrollBar setStyleSheet please..

  • Qt scrollbars and QDialog scrollbars are round and easy to see.

    However, scrollbars that zoom in on my QGraphicsView do not like the arrows and colors.

    Is there a setStyleSheet that does exactly the same thing?

    this is Qt & Qdialog ScrollBar.

    this is QGraphicsView ScrollBar.

  • The scrollbar inside the QGraphicsView is inherited from QAbstractScrollArea, which
    "provides a scrolling area with on-demand scroll bars."
    QAbstractScrollArea Qt Doc

    I think you have to override your QGraphicsView to create a custom QAbstractScrollArea with your custom QScrollBar design, in fact that you can not just change the design (CSS) of the ScrollBar provided by your QGraphicsView (correct me if I'm wrong).

    QAbstractScrollArea StyleSheets
    QScrollBar StyleSheet

Log in to reply