Logo Search packages:      
Sourcecode: qps version File versions

QScrollBar * QtTableView::horizontalScrollBar (  )  const [protected]

Returns a pointer to the horizontal scroll bar mainly so you can connect() to its signals. Note that the scroll bar works in pixel values; use findCol() to translate to cell numbers.

Definition at line 1468 of file qttableview.C.

References horSbSliding(), horSbSlidingDone(), horSbValue(), and hScrollBar.

Referenced by setHorScrollBar().

    QtTableView *that = (QtTableView*)this; // semantic const
    if ( !hScrollBar ) {
      QScrollBar *sb = new QScrollBar( QScrollBar::Horizontal, that );
#ifndef QT_NO_CURSOR
      sb->setCursor( arrowCursor );
      sb->resize( sb->sizeHint() ); // width is irrelevant
      sb->setFocusPolicy( NoFocus );
      sb->setTracking( FALSE );
      connect( sb, SIGNAL(valueChanged(int)),
      connect( sb, SIGNAL(sliderMoved(int)),
      connect( sb, SIGNAL(sliderReleased()),
      that->hScrollBar = sb;
      return sb;
    return hScrollBar;

Generated by  Doxygen 1.6.0   Back to index