I'm at home and I don't have the code in front of me but it was something like that:
if (scrollbar->orientation == Qt::Horizontal)
result.setRect(16, 0, scrollbar->rect.width()-32, scrollbar->rect.height());
result.setRect(0, 16, scrollbar->rect.width(), scrollbar->rect.height()-32);
This code is in QStyle :: subControlRect method. To set the QRect for the arrow buttons i have other case clauses with QStyle::SC_ScrollBarAddLine and QStyle::SC_ScrollBarSubLine. The width of the arrow buttons for the horizontal scrollbar is 16, the same for the height for the vertical scrollbar. I also have more case clauses for the space between the slider and arrow buttons with QStyle::SC_ScrollBarAddPage and QStyle::SC_ScrollBarSubPage.
I have to say that the arrow buttons and the spaces between these and the slider is correct. The only problem is with the action area of the slider, that doesn't begin where the arrow button ends, but starts from the beginning of the scrollbar.
Thank you for your reply ;-)