I have a class that connects a Lcd display with a dial and when you rotate the dial you get values on the lcd like this
#ifndef SLIDELCD_H
#define SLIDELCD_H
#include <QDial>
#include <QVBoxLayout>
#include <QLCDNumber>
#include "CustomDial.h"
class SlideLcd: public QWidget
{
Q_OBJECT
public:
SlideLcd(QWidget *parent=nullptr);
private:
CustomDial *dial;
QLCDNumber *lcd;
QVBoxLayout *layout;
};
SlideLcd::SlideLcd(QWidget *parent)
:QWidget(parent)
{
dial = new CustomDial;
dial->setNotchesVisible(true);
lcd = new QLCDNumber;
connect(dial, SIGNAL(valueChanged(int)), lcd , SLOT(display(int)));
layout = new QVBoxLayout;
layout->addWidget(lcd);
layout->addWidget(dial);
setLayout(layout);
}
I know that with QDial::setRange(0,100) you can set the range from 0-100 but is there any way to set ranges like 0.00 to 100.00