diff options
| author | tony mancill <tmancill@debian.org> | 2026-04-12 08:46:47 -0700 |
|---|---|---|
| committer | tony mancill <tmancill@debian.org> | 2026-04-12 08:46:47 -0700 |
| commit | cd2dad3bc7ae0ee0a18b7b20a945009362ec3851 (patch) | |
| tree | 5a622ec4193e9bc899f6499f936848a661be29cb /mycustomspinbox.cpp | |
| parent | 558c0b9d6ecf70c5222e2069ece1fea3656c75d7 (diff) | |
| parent | 291b3817bf0c7a742e9e17d42c94fc8c9530e40d (diff) | |
Merge branch 'debian/latest' into debian/trixie-backports
Diffstat (limited to 'mycustomspinbox.cpp')
| -rw-r--r-- | mycustomspinbox.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mycustomspinbox.cpp b/mycustomspinbox.cpp new file mode 100644 index 00000000..0a61c906 --- /dev/null +++ b/mycustomspinbox.cpp @@ -0,0 +1,16 @@ +#include "mycustomspinbox.h" + +MyCustomSpinBox::MyCustomSpinBox(QWidget *parent) + : QSpinBox(parent) +{ +} + +QString MyCustomSpinBox::textFromValue(int val) const +{ + // Determine the desired number of digits (e.g., 2 for "01", "09", "10") + // You can make this dynamic based on the maximum value or a fixed number. + int desiredDigits = 3; // Example: always show at least 3 digits + + QString formattedString = QString("%1").arg(val, desiredDigits, 10, QChar('0')); + return formattedString; +} |
