Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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.
    0_1546416876994_1.png

    this is QGraphicsView ScrollBar.
    0_1546416907825_2.png



  • 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