QSpinBox is a widget in the Qt library that allows users to input a number value. The setSuffix function can be used to set a text string that appears next to the number value in the spin box. This can be useful for displaying units of measurement or other text that is related to the value.
Example 1: Set a suffix of "m" for meters in a spin box that accepts values between 0 and 100:
QSpinBox *spinBox = new QSpinBox();
spinBox->setRange(0, 100);
spinBox->setSuffix("m");
Example 2: Set a suffix of "°C" for degrees Celsius in a spin box that accepts values between -50 and 50:
QSpinBox *spinBox = new QSpinBox();
spinBox->setRange(-50, 50);
spinBox->setSuffix("°C");
Package Library: Qt Library.
C++ (Cpp) QSpinBox::setSuffix - 30 examples found. These are the top rated real world C++ (Cpp) examples of QSpinBox::setSuffix extracted from open source projects. You can rate examples to help us improve the quality of examples.