Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{alias:qsettracking}
h2. Name

*qsettracking* — enables continous mouse tracking in slider

h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}

*qsettracking* \[_slider_]  *0 | 1*

{panel}

h2. Description

The *qsettracking* command enabled or disables tracking for a slider. If tracking is enabled, the slider will invoke its callback commands for each step of the slider movement. If tracking is disabled the callback command will be called only when the user releases the mousebutton. 

Tracking is enabled by default. 

h2. Arguments

_slider_
{indent}An instance of [QHSlider] or [QVSlider] object. 
{indent}

*0 | 1*
{indent}A '1' or '0', which enables or disables tracking, respectively. 

{indent} 

h2. Examples

h3. Ex.1: Set tracking
{anchor:Set tracking}

{noformat:|borderWidth=1|bgColor=#eeeeee}
set w [qwidget]
qsetwindowtitle Slider
set layout [qvboxlayout $w]
set slider [qhslider 1 10 puts]
qsettickposition both
qsettracking 0
qaddwidget $layout $slider

qshow $w

{noformat}

!att:_img_cmd^qsettracking.png!

The example above creates a slider with tracking disabled. The call to 'puts' will therefore be called only when the user releases the slider handle. The slider value will be appended to the 'puts' command. 


{pagebreak}