/
pi_coder
/
ByteMachine
Обзор
Документация
Войти
/
pi_coder
/
ByteMachine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/forms/form_adv_spin_box.cpp
40 строк
1 KB
pimenov-and
Восстановление функционала старой версии
28 июл 2026, 20:04
28 июл 2026, 20:04
98412d0
Код
Авторство
О чём код?
//////////////////////////////////////////////////////////////// // ByteMachine // Продвинутый SpinBox //////////////////////////////////////////////////////////////// #include "form_adv_spin_box.h" //============================================================== // Конструктор с параметром //============================================================== FormAdvSpinBox::FormAdvSpinBox(QWidget *parent) : QSpinBox{parent} { #ifdef Q_OS_WASM const QFont font{"Segoe UI", 10}; setFont(font); #endif // Q_OS_WASM } //============================================================== // Функция перевода значения в строку //============================================================== QString FormAdvSpinBox::textFromValue(int value) const { if (displayIntegerBase() == 16) { const QString textValue = QSpinBox::textFromValue(value).toUpper(); if (textValue.length() == 1) { return '0' + textValue; } else { return textValue; } } else { return QSpinBox::textFromValue(value); } }