git-svn-id: svn://db.shs.com.ru/libs@654 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-12-05 11:27:38 +00:00
parent d8b59d19f1
commit d5eaa289b2
2 changed files with 18 additions and 0 deletions

View File

@@ -41,6 +41,21 @@ void SpinSlider::setOrientation(Qt::Orientation orient) {
}
bool SpinSlider::adaptiveStep() const {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
return (spin->stepType() == QDoubleSpinBox::AdaptiveDecimalStepType);
#endif
return false;
}
void SpinSlider::setAdaptiveStep(bool on) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
if (on) spin->setStepType(QDoubleSpinBox::AdaptiveDecimalStepType);
else spin->setStepType(QDoubleSpinBox::DefaultStepType);
#endif
}
void SpinSlider::adjust() {
adjusting = true;
delim = qPow(10, dec_);