Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Name

qsettracking — enables continous mouse tracking in slider

Syntax

qsettracking [slider] 0 | 1

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.

Arguments

slider

An instance of qhslider or qvslider object.

0 | 1

A '1' or '0', which enables or disables tracking, respectively.

Examples

Ex.1: Set tracking

set w [qwidget]
qsetwindowtitle Slider
set layout [qvboxlayout $w]
set slider [qhslider 1 10 puts]
qsettickposition both
qsettracking 0
qaddwidget $layout $slider

qshow $w

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.

  • No labels