PDA

View Full Version : QSlider and right mouse button



Abnormalia
11th October 2007, 22:44
This is my first post here, so want to hi everyine :)

I have small problem with QSlider widget.

I cannot modify it's value while right mouse is pressed down.

Slider is nested in context menu, which closes when right mouse button is depressed.

I can only change slider values using keyboard.

So is there solution for that ? How to enable modifying slider values using mouse + right mouse button pressed ?


Thank all in advance.

wysota
12th October 2007, 12:18
If you just click with the right button (instead of pressing and holding it) the menu should remain open. Try it, maybe it works for you.

If not, you'll probably have to subclass QSlider and reimplement some of the mouse events and filter out the right mouse button from the set of pressed buttons in the event object.

Abnormalia
12th October 2007, 12:27
If you just click with the right button (instead of pressing and holding it) the menu should remain open. Try it, maybe it works for you.

If not, you'll probably have to subclass QSlider and reimplement some of the mouse events and filter out the right mouse button from the set of pressed buttons in the event object.

Yeah we already agreed to change specs and make it like you suggested. Anyway why it is impossible to change sliders ? If I can set chekboxes, and other widgets I should be able to set sliders too.

wysota
12th October 2007, 12:35
The slider probably checks which buttons are pressed and works if only the left button is pressed. But you can check that yourself in the sources, I'm just guessing.

olidem
17th March 2009, 13:13
Hi, I hope you are still subscribed to this thread...

Did I get that right?

You said that you have a QSlider in a Context Menu.
Does this mean that if you eg. right-click somewhere, a menu opens that has a QSlider as item?

How do you realise that, I am exactly searching for something like this.

Best regards,

Olli