I recently updated form Qt 5.7 to Qt 5.13 on Windows using MSVC 2017. The QSpinBoxes now take too much space. This behaviour can be observed for the example qtbase/widgets/widgets/sliders shipped with Qt (just compile and run the example to see that QSpinBox scales ugly compared to previous Qt versions).

It is possible to restore the old behaviour by adding a (completely nonsense) call to setStyleSheet in main.cpp:

Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication app(argc, argv);
  4. app.setStyleSheet("QFoo { }"); // nonsense call to setStyleSheet
  5. Window window;
  6. window.show();
  7. return app.exec();
  8. }
To copy to clipboard, switch view to plain text mode 

Is there a more elegant way to stimulate the desired behaviour of QSpinBox as before in Qt5.7?

Best regards, Lin