QSlider and right mouse button
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.
Re: QSlider and right mouse button
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.
Re: QSlider and right mouse button
Quote:
Originally Posted by
wysota
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.
Re: QSlider and right mouse button
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.
Re: QSlider and right mouse button
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