Qt-interest Archive, March 2008
value displayed along the QSlider
Message 1 in thread
Does anyone know an easy way to display the actual value of the slider right
beside the cursor (i mean with the label displaying the value following the
cursor position) like it is the case in Gtk with the Scale widget ( example
here : http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png )
Do I have to create a label and refresh the position always or is there
something easier?
Thanks for your help.
[image: http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png]
Message 2 in thread
Create the label and the following works.
connect( slider, SIGNAL( valueChanged( int ) ), label, SLOT( setNum( int
) ) );
Scott
From: Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
Sent: Thursday, March 13, 2008 7:14 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: value displayed along the QSlider
Does anyone know an easy way to display the actual value of the slider
right beside the cursor (i mean with the label displaying the value
following the cursor position) like it is the case in Gtk with the Scale
widget ( example here :
http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png )
Do I have to create a label and refresh the position always or is there
something easier?
Thanks for your help.
http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png<http://w
ww.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png>
Message 3 in thread
thanks for your answer Scott but I also want the label to follow the
position of the slider so as to have the value of the slider always
displayed beside the slide cursor (so I guess i "simply" have to update the
label position according to the slider cursor position?)
On Thu, Mar 13, 2008 at 4:17 PM, Scott Aron Bloom <Scott.Bloom@xxxxxxxxxxxx>
wrote:
> Create the label and the following works.
>
>
>
> connect( slider, SIGNAL( valueChanged( int ) ), label, SLOT( setNum( int )
> ) );
>
>
>
> Scott
>
>
>
>
>
> *From:* Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
> *Sent:* Thursday, March 13, 2008 7:14 AM
> *To:* qt-interest@xxxxxxxxxxxxx
> *Subject:* value displayed along the QSlider
>
>
>
> Does anyone know an easy way to display the actual value of the slider
> right beside the cursor (i mean with the label displaying the value
> following the cursor position) like it is the case in Gtk with the Scale
> widget ( example here :
> http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png )
> Do I have to create a label and refresh the position always or is there
> something easier?
> Thanks for your help.
>
>
> [image: http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png]
>
>
Message 4 in thread
Im not sure what you mean.... With the connection I presented,
everytime the value of the slider changes the label gets update...
Or are you talking about when the slider is dragging without a change,
so the user could see what the value will be?
Scott
From: Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
Sent: Thursday, March 13, 2008 8:25 AM
To: Scott Aron Bloom
Cc: qt-interest@xxxxxxxxxxxxx
Subject: Re: value displayed along the QSlider
thanks for your answer Scott but I also want the label to follow the
position of the slider so as to have the value of the slider always
displayed beside the slide cursor (so I guess i "simply" have to update
the label position according to the slider cursor position?)
On Thu, Mar 13, 2008 at 4:17 PM, Scott Aron Bloom
<Scott.Bloom@xxxxxxxxxxxx> wrote:
Create the label and the following works.
connect( slider, SIGNAL( valueChanged( int ) ), label, SLOT( setNum( int
) ) );
Scott
From: Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
Sent: Thursday, March 13, 2008 7:14 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: value displayed along the QSlider
Does anyone know an easy way to display the actual value of the slider
right beside the cursor (i mean with the label displaying the value
following the cursor position) like it is the case in Gtk with the Scale
widget ( example here :
http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png )
Do I have to create a label and refresh the position always or is there
something easier?
Thanks for your help.
Error! Filename not specified.
Message 5 in thread
BTW.. if you are... rather then valueChanged... use the sliderMoved
signal
From: Scott Aron Bloom [mailto:Scott.Bloom@xxxxxxxxxxxx]
Sent: Thursday, March 13, 2008 8:37 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: RE: value displayed along the QSlider
Im not sure what you mean.... With the connection I presented,
everytime the value of the slider changes the label gets update...
Or are you talking about when the slider is dragging without a change,
so the user could see what the value will be?
Scott
From: Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
Sent: Thursday, March 13, 2008 8:25 AM
To: Scott Aron Bloom
Cc: qt-interest@xxxxxxxxxxxxx
Subject: Re: value displayed along the QSlider
thanks for your answer Scott but I also want the label to follow the
position of the slider so as to have the value of the slider always
displayed beside the slide cursor (so I guess i "simply" have to update
the label position according to the slider cursor position?)
On Thu, Mar 13, 2008 at 4:17 PM, Scott Aron Bloom
<Scott.Bloom@xxxxxxxxxxxx> wrote:
Create the label and the following works.
connect( slider, SIGNAL( valueChanged( int ) ), label, SLOT( setNum( int
) ) );
Scott
From: Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
Sent: Thursday, March 13, 2008 7:14 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: value displayed along the QSlider
Does anyone know an easy way to display the actual value of the slider
right beside the cursor (i mean with the label displaying the value
following the cursor position) like it is the case in Gtk with the Scale
widget ( example here :
http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png )
Do I have to create a label and refresh the position always or is there
something easier?
Thanks for your help.
Error! Filename not specified.
Message 6 in thread
well to state it more clearly, if you look at the picture here:
http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png
you can see that the value "Scrollbar Page Size" (36) is situated right
above the position of the slider itself
if the slider is dragged somewhere on the left or on the right, the
displayed value will move as well to stay above.
That's very easy to achieve in gtkmm (e.g.
scale->set_value_pos(Gtk::POS_ABOVE))
but i don't know if such a possibility exists in QT
On Thu, Mar 13, 2008 at 4:38 PM, Scott Aron Bloom <Scott.Bloom@xxxxxxxxxxxx>
wrote:
> BTW.. if you are… rather then valueChanged… use the sliderMoved signal
>
>
>
> *From:* Scott Aron Bloom [mailto:Scott.Bloom@xxxxxxxxxxxx]
> *Sent:* Thursday, March 13, 2008 8:37 AM
> *To:* qt-interest@xxxxxxxxxxxxx
> *Subject:* RE: value displayed along the QSlider
>
>
>
> Im not sure what you mean…. With the connection I presented, everytime
> the value of the slider changes the label gets update…
>
>
>
> Or are you talking about when the slider is dragging without a change, so
> the user could see what the value will be?
>
> Scott
>
>
>
> *From:* Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
> *Sent:* Thursday, March 13, 2008 8:25 AM
> *To:* Scott Aron Bloom
> *Cc:* qt-interest@xxxxxxxxxxxxx
> *Subject:* Re: value displayed along the QSlider
>
>
>
> thanks for your answer Scott but I also want the label to follow the
> position of the slider so as to have the value of the slider always
> displayed beside the slide cursor (so I guess i "simply" have to update the
> label position according to the slider cursor position?)
>
> On Thu, Mar 13, 2008 at 4:17 PM, Scott Aron Bloom <
> Scott.Bloom@xxxxxxxxxxxx> wrote:
>
> Create the label and the following works.
>
>
>
> connect( slider, SIGNAL( valueChanged( int ) ), label, SLOT( setNum( int )
> ) );
>
>
>
> Scott
>
>
>
>
>
> *From:* Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
> *Sent:* Thursday, March 13, 2008 7:14 AM
> *To:* qt-interest@xxxxxxxxxxxxx
> *Subject:* value displayed along the QSlider
>
>
>
> Does anyone know an easy way to display the actual value of the slider
> right beside the cursor (i mean with the label displaying the value
> following the cursor position) like it is the case in Gtk with the Scale
> widget ( example here :
> http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png )
> Do I have to create a label and refresh the position always or is there
> something easier?
> Thanks for your help.
>
>
> *Error! Filename not specified.*
>
>
>
Message 7 in thread
AHHH.. now I get it.. L
Does the label stay visible when your not clicked? I don't think it
would be too hard to implement this...
Scott
From: Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
Sent: Thursday, March 13, 2008 8:45 AM
To: Scott Aron Bloom
Cc: qt-interest@xxxxxxxxxxxxx
Subject: Re: value displayed along the QSlider
well to state it more clearly, if you look at the picture here:
http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png
you can see that the value "Scrollbar Page Size" (36) is situated right
above the position of the slider itself
if the slider is dragged somewhere on the left or on the right, the
displayed value will move as well to stay above.
That's very easy to achieve in gtkmm (e.g.
scale->set_value_pos(Gtk::POS_ABOVE))
but i don't know if such a possibility exists in QT
On Thu, Mar 13, 2008 at 4:38 PM, Scott Aron Bloom
<Scott.Bloom@xxxxxxxxxxxx> wrote:
BTW.. if you are... rather then valueChanged... use the sliderMoved
signal
From: Scott Aron Bloom [mailto:Scott.Bloom@xxxxxxxxxxxx]
Sent: Thursday, March 13, 2008 8:37 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: RE: value displayed along the QSlider
Im not sure what you mean.... With the connection I presented,
everytime the value of the slider changes the label gets update...
Or are you talking about when the slider is dragging without a change,
so the user could see what the value will be?
Scott
From: Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
Sent: Thursday, March 13, 2008 8:25 AM
To: Scott Aron Bloom
Cc: qt-interest@xxxxxxxxxxxxx
Subject: Re: value displayed along the QSlider
thanks for your answer Scott but I also want the label to follow the
position of the slider so as to have the value of the slider always
displayed beside the slide cursor (so I guess i "simply" have to update
the label position according to the slider cursor position?)
On Thu, Mar 13, 2008 at 4:17 PM, Scott Aron Bloom
<Scott.Bloom@xxxxxxxxxxxx> wrote:
Create the label and the following works.
connect( slider, SIGNAL( valueChanged( int ) ), label, SLOT( setNum( int
) ) );
Scott
From: Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
Sent: Thursday, March 13, 2008 7:14 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: value displayed along the QSlider
Does anyone know an easy way to display the actual value of the slider
right beside the cursor (i mean with the label displaying the value
following the cursor position) like it is the case in Gtk with the Scale
widget ( example here :
http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png )
Do I have to create a label and refresh the position always or is there
something easier?
Thanks for your help.
Error! Filename not specified.
Message 8 in thread
FYI, I have used tool tips for this purpose with great effect. The
tooltip can be made to move with the mouse pointer very nicely and ir
then disappears when you no longer need it.
John
Scott Aron Bloom wrote:
>
> AHHH.. now I get it.. L
>
> Does the label stay visible when your not clicked? I don’t think it
> would be too hard to implement this…
>
> Scott
>
> *From:* Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx]
> *Sent:* Thursday, March 13, 2008 8:45 AM
> *To:* Scott Aron Bloom
> *Cc:* qt-interest@xxxxxxxxxxxxx
> *Subject:* Re: value displayed along the QSlider
>
> well to state it more clearly, if you look at the picture here:
> http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png
> you can see that the value "Scrollbar Page Size" (36) is situated
> right above the position of the slider itself
> if the slider is dragged somewhere on the left or on the right, the
> displayed value will move as well to stay above.
> That's very easy to achieve in gtkmm (e.g.
> scale->set_value_pos(Gtk::POS_ABOVE))
> but i don't know if such a possibility exists in QT
>
>
> On Thu, Mar 13, 2008 at 4:38 PM, Scott Aron Bloom
> <Scott.Bloom@xxxxxxxxxxxx <mailto:Scott.Bloom@xxxxxxxxxxxx>> wrote:
>
> BTW.. if you are… rather then valueChanged… use the sliderMoved signal
>
> *From:* Scott Aron Bloom [mailto:Scott.Bloom@xxxxxxxxxxxx
> <mailto:Scott.Bloom@xxxxxxxxxxxx>]
> *Sent:* Thursday, March 13, 2008 8:37 AM
>
>
> *To:* qt-interest@xxxxxxxxxxxxx <mailto:qt-interest@xxxxxxxxxxxxx>
>
> *Subject:* RE: value displayed along the QSlider
>
> Im not sure what you mean…. With the connection I presented, everytime
> the value of the slider changes the label gets update…
>
> Or are you talking about when the slider is dragging without a change,
> so the user could see what the value will be?
>
> Scott
>
> *From:* Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx
> <mailto:ybarbeaux@xxxxxxxxx>]
> *Sent:* Thursday, March 13, 2008 8:25 AM
> *To:* Scott Aron Bloom
> *Cc:* qt-interest@xxxxxxxxxxxxx <mailto:qt-interest@xxxxxxxxxxxxx>
> *Subject:* Re: value displayed along the QSlider
>
> thanks for your answer Scott but I also want the label to follow the
> position of the slider so as to have the value of the slider always
> displayed beside the slide cursor (so I guess i "simply" have to
> update the label position according to the slider cursor position?)
>
> On Thu, Mar 13, 2008 at 4:17 PM, Scott Aron Bloom
> <Scott.Bloom@xxxxxxxxxxxx <mailto:Scott.Bloom@xxxxxxxxxxxx>> wrote:
>
> Create the label and the following works.
>
> connect( slider, SIGNAL( valueChanged( int ) ), label, SLOT( setNum(
> int ) ) );
>
> Scott
>
> *From:* Yannick Barbeaux [mailto:ybarbeaux@xxxxxxxxx
> <mailto:ybarbeaux@xxxxxxxxx>]
> *Sent:* Thursday, March 13, 2008 7:14 AM
> *To:* qt-interest@xxxxxxxxxxxxx <mailto:qt-interest@xxxxxxxxxxxxx>
> *Subject:* value displayed along the QSlider
>
> Does anyone know an easy way to display the actual value of the slider
> right beside the cursor (i mean with the label displaying the value
> following the cursor position) like it is the case in Gtk with the
> Scale widget ( example here :
> http://www.pygtk.org/pygtk2tutorial-es/figures/rangewidgets.png )
> Do I have to create a label and refresh the position always or is
> there something easier?
> Thanks for your help.
>
>
> *Error! Filename not specified.*
>
--
[ signature omitted ]