QScrollBar

Section: Misc. Reference Manual Pages (3qt)
Updated: 2 February 2007
Index Return to Main Contents
 

NAME

QScrollBar - Vertical or horizontal scroll bar  

SYNOPSIS

#include <qscrollbar.h>

Inherits QWidget and QRangeControl.

 

Public Members


QScrollBar ( QWidget * parent, const char * name = 0 )

QScrollBar ( Orientation orientation, QWidget * parent, const char * name = 0 )

QScrollBar ( int minValue, int maxValue, int lineStep, int pageStep, int value, Orientation orientation, QWidget * parent, const char * name = 0 )

~QScrollBar ()

virtual void setOrientation ( Orientation )

Orientation orientation () const

virtual void setTracking ( bool enable )

bool tracking () const

bool draggingSlider () const

virtual void setPalette ( const QPalette & p )

int minValue () const

int maxValue () const

void setMinValue ( int )

void setMaxValue ( int )

int lineStep () const

int pageStep () const

void setLineStep ( int )

void setPageStep ( int )

int value () const

int sliderStart () const

QRect sliderRect () const
 

Public Slots


void setValue ( int )
 

Signals


void valueChanged ( int value )

void sliderPressed ()

void sliderMoved ( int value )

void sliderReleased ()

void nextLine ()

void prevLine ()

void nextPage ()

void prevPage ()
 

Properties


bool draggingSlider - whether the user has clicked the mouse on the slider and is currently dragging it (read only)

int lineStep - the line step

int maxValue - the scroll bar's maximum value

int minValue - the scroll bar's minimum value

Orientation orientation - the orientation of the scroll bar

int pageStep - the page step

bool tracking - whether scroll bar tracking is enabled

int value - the scroll bar's value
 

Protected Members


virtual void hideEvent ( QHideEvent * )
 

DESCRIPTION

The QScrollBar widget provides a vertical or horizontal scroll bar.

A scroll bar allows the user to control a value within a program-definable range and gives users a visible indication of the current value of a range control.

Scroll bars include four separate controls:

The line-up and line-down controls are little buttons which the user can use to move one "line" up or down. The meaning of line is configurable. In editors and list boxes it means one line of text; in an image viewer it might mean 20 pixels.
The slider is the handle that indicates the current value of the scroll bar, which the user can drag to change the value. This part of the scroll bar is sometimes called the "thumb".
The page-up/page-down control is the area on which the slider slides (the scroll bar's background). Clicking here moves the scroll bar towards the click. The meaning of "page" is also configurable: in editors and list boxes it means as many line