View Full Version : Moving the needle in qwtDial using keyboard
Navi
26th June 2015, 07:09
i would like to change the value of the dial by moving the needle using Mouse or keyboard
how do i resolve?
http://qwt.sourceforge.net/class_qwt_abstract_slider.html#ab6d1105f82e8a44ea7 5661135ba88c85
Uwe
Navi
27th June 2015, 06:55
http://qwt.sourceforge.net/class_qwt_abstract_slider.html#ab6d1105f82e8a44ea7 5661135ba88c85
Uwe
Though read only mode is false,needle is not moving using mouse
Navi
30th June 2015, 04:19
hi Uwe
Though read only mode is false,needle is not moving using mouse
Check the dials example and compare it with your code.
Uwe
Navi
30th June 2015, 06:49
Check the dials example and compare it with your code.
Uwe
This is my code
i could not do it in mouse
void Dial::mousePressEvent(QMouseEvent *event)
{
if (event->button() ==Qt::LeftButton)
myDial->setSingleSteps(4);
}
but i can do it in keyboard...
void Dial::keyPressEvent(QKeyEvent *event)
{
if(event->key()==Qt::Key_Left)
myDial->setSingleSteps(4);
}
Throw your code away ( it doesn't make any sense - neither for keyboard or mouse events ) and use the dial as it is.
Uwe
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.