Skip to content
  • 0 Votes
    2 Posts
    6k Views
    mrjjM
    Hi and welcome I think you might need to set margin for inner area The following works for me with 32x32 images for the ends /*inner area*/ QScrollBar::vertical { border: 1px solid #a5a5a5; background: none; width: 65px; margin: 42px 0 42px 0; /* match top/lower area*/ } /*the knob*/ QScrollBar::handle:vertical { background: #d5d5d5;; border: 2px solid #000000; min-height: 60px; border-radius: 12px; } /*lower arrow area*/ QScrollBar::add-line:vertical { border: 0px solid grey; background: NONE; height: 40px; subcontrol-position: bottom; subcontrol-origin: margin; } /*top arrow area*/ QScrollBar::sub-line:vertical { border: 0px solid grey; background: none; height: 40px; subcontrol-position: top; subcontrol-origin: margin; } /*arrows*/ QScrollBar::up-arrow:vertical { image: url(:/GFX/sbar/up_arrow_scrollbar.png); } /*pressed*/ QScrollBar::up-arrow:vertical::pressed { image: url(:/GFX/sbar/up_arrow_scrollbar_pressed.png); } QScrollBar::down-arrow:vertical::pressed { image: url(:/GFX/sbar/down_arrow_scrollbar_pressed.png); } QScrollBar::down-arrow:vertical { /* border: 2px solid grey; width: 3px; height: 23px; */ image: url(:/GFX/sbar/down_arrow_scrollbar.png); } QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; }
  • [SOLVED] scrollArea in scrollArea

    General and Desktop qscrollbar qscrollarea
    5
    0 Votes
    5 Posts
    2k Views
    mrjjM
    ah. the _scrollAreaLayer does respect the size limits then. Good to know.
  • 0 Votes
    7 Posts
    3k Views
    A
    First of all I have never done what you wanted, so my advises might not work well You might want to override : void QAbstractScrollArea::setupViewport ( QWidget * viewport ) [protected slot] This slot is called by QAbstractScrollArea after setViewport(viewport) has been called. Reimplement this function in a subclass of QAbstractScrollArea to initialize the new viewport before it is used. You can actually either hide scrollbar provided by QAbstractScrollArea and display your own instead or subclass scrollbar and set it to itemView.
  • Set AutoRepeat for QScrollbar?

    General and Desktop qscrollbar
    6
    0 Votes
    6 Posts
    2k Views
    SGaistS
    I did not meant to reimplement setRepeatAction, just use it in a subclass
  • 0 Votes
    1 Posts
    838 Views
    No one has replied