#include #include #include #include #include #include int main(int argc, char *argv[]) { // application QApplication app(argc,argv); // spinbox too narrow on 4K screen under Windows 10 QDoubleSpinBox *spinbox = new QDoubleSpinBox(); spinbox->setRange(0.0,100.0); spinbox->setValue(100.0); // large font will cause spinbox to become taller, but too narrow for text QFont font(spinbox->font()); font.setPixelSize(50); spinbox->setFont(font); QHBoxLayout *layout = new QHBoxLayout(); layout->addStretch(); layout->addWidget(spinbox); layout->addStretch(); QWidget widget; widget.setLayout(layout); widget.show(); return QApplication::exec(); }