i would like to change the value of the dial by moving the needle using Mouse or keyboard
how do i resolve?
i would like to change the value of the dial by moving the needle using Mouse or keyboard
how do i resolve?
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)
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);
}
Last edited by Navi; 30th June 2015 at 06:55.
Throw your code away ( it doesn't make any sense - neither for keyboard or mouse events ) and use the dial as it is.
Uwe
Bookmarks