-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
4.7.3
-
None
-
Qt 4.8 and 5.0 on: Windows 7, Windows XP, Ubuntu 12.04
I create 3 state QSlider with range (-1, 0, 1)
When I try to set its position by mouse clicking, it sets only in -1 and 1.
Please, add something like this:
void ThreeStateSlider::mousePressEvent ( QMouseEvent * event ){
QSlider::mousePressEvent(event);
const int middle = (this->height() / 2);
const int deviation = this->height() / ((this->maximum() - this->minimum() + 1) * 2);
const int lowMid = middle - deviation;
const int highMid = middle + deviation;
const int y = event->pos().y();
if ((y >= lowMid) && (y <= highMid))
}