Describe the bug
The width calculation logic in SliderLabel appears to be not very robust for use withing QLabeledDoubleRangeSlider.
E.g. when setting the range using integer values, all label fields (min, max, and values) are cut off (see Example 1 below). When setting the range using floats, the label width is slightly bigger, but still not big enough, and importantly it doesn't scale properly when increasing the number of decimals (see Example 2).
To Reproduce
Example 1:
from PyQt5 import QtWidgets as QtW
from PyQt5.QtCore import Qt
from superqt import QLabeledDoubleRangeSlider
app = QtW.QApplication([])
slider = QLabeledDoubleRangeSlider(Qt.Orientation.Horizontal)
slider.setRange(-1, 1)
slider.setValue((-0.5, 0.5))
slider.show()
app.exec_()
Example 2:
from PyQt5 import QtWidgets as QtW
from PyQt5.QtCore import Qt
from superqt import QLabeledDoubleRangeSlider
app = QtW.QApplication([])
slider = QLabeledDoubleRangeSlider(Qt.Orientation.Horizontal)
slider.setRange(-1.0, 1.0)
slider.setDecimals(5)
slider.setValue((-0.5, 0.5))
slider.show()
app.exec_()
Expected behavior
The slider labels should grow to fit the entire value.
Screenshots
Example 1:

The labels only show the numbers after the decimal point, but upon focusing them it is possible to scroll through to see they indeed contain the full value.
Example 2:

Desktop:
- OS: Windows 11 Version 10.0.26200 Build 26200
- Qt Backend: PyQt5
- Python version: 3.13.12
Describe the bug
The width calculation logic in
SliderLabelappears to be not very robust for use withingQLabeledDoubleRangeSlider.E.g. when setting the range using integer values, all label fields (min, max, and values) are cut off (see Example 1 below). When setting the range using floats, the label width is slightly bigger, but still not big enough, and importantly it doesn't scale properly when increasing the number of decimals (see Example 2).
To Reproduce
Example 1:
Example 2:
Expected behavior
The slider labels should grow to fit the entire value.
Screenshots

Example 1:
The labels only show the numbers after the decimal point, but upon focusing them it is possible to scroll through to see they indeed contain the full value.
Example 2:

Desktop: