SpinSlider and ScrollSpinBox read-only support

PIVariantEdit - support for read-only for all types
PIValueTreeEdit - drop Parent grouping, default now Groups, full grouping control, global read-only support, fix new label error
This commit is contained in:
2023-04-28 19:51:22 +03:00
parent e7ef97dc6a
commit 46fd68a0fd
13 changed files with 102 additions and 27 deletions
+4 -1
View File
@@ -77,6 +77,9 @@ public:
bool invertedAppearance() const { return slider->invertedAppearance(); }
bool squareScale() const { return square; }
void setReadOnly(bool r);
bool isReadOnly() const { return m_read_only; }
void setSingleStep(double step) {
spin->setSingleStep(step);
slider->setPageStep(qRound(step * delim));
@@ -134,7 +137,7 @@ private:
double min_, max_, val_, delim, page;
int dec_, ticks_;
bool adjusting, square;
bool adjusting, square, m_read_only = false;
QSlider * slider;
QDoubleSpinBox * spin;
QBoxLayout * layout;