title: The size/length of a QScrollBar
body: <p>I'm working on a GUI with a Qwt plot and came across a seemingly banal problem - namely I can't resize a QScrollBar the way I would like to.<br>
  This is how the plot looks like:<br>
  <a href="http://tinypic.com/view.php?pic=6534o0&amp;s=5#.UpXAwoZhauY" rel="nofollow">http://tinypic.com/view.php?pic=6534o0&amp;s=5#.UpXAwoZhauY</a>
  <p>
  As you can see the vertical and horizontal scroll are bigger/longer than the size of plot canvas and I would like to make them smaller.<br>
  I tried scroll->setContentsMargin, I tried styling with margin or height/ width, tried using sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, stretch=3) or overriding the sizeHint virtual function:</p>
  
  <blockquote>
    <p>QSize CScroll::sizeHint() const <br>
    {</p>
    
    <blockquote>
      <p>QSize s=QScrollBar::sizeHint();<br>
      const QSize size(s.width()*0.5, s.height());<br>
      return size;<br>
      }</p>
    </blockquote>
  </blockquote>
  
  <p>but as you can see in the screenshot - the size hint affects only the "thickness" of the scroll - so the vertical scroll is affected and the the horizontal one, not.</p>
  
  <p><br>I also tried changing the grid layout so that it had one more column/row and empty cells to force the scrollbars to move, but that resulted in scrolls taking half of the space I wanted them too (and I'm no expert when it comes to using layouts).</p>
  
  <p>PS. I am using custom scrollbars because using QScrollArea with a QwtPlot doesn't really work</p>