Somehow my QSlider is not sliding. I am only able to click on the slider and then the slider changes his position. I have checked with examples but everything seems to be the same.
Here is one of my QSliders:
QSlider *obj_scale_x= new QSlider(Qt::Horizontal);
obj_scale_x->setValue(10);
obj_scale_x->setToolTip(tr("Scale object"));
obj_scale_x->setRange(1,50);
obj_scale_x->setTickPosition(QSlider::TicksAbove);
connect(obj_scale_x, SIGNAL(valueChanged(int)), this, SLOT(objScale_x(int)));
I thought the problem might be the mouse. But this is not working either.
void OpenGLScene::mousePressEvent(QMouseEvent *event)
{
lastPos = event->pos();
}
void OpenGLScene::mouseMoveEvent(QMouseEvent *event)
{
lastPos = event->pos();
}
I am definining the Slider in QGraphicsScene-based class. it might be this, but I am at my wit's end.
Maybe the answer to your problem is: