Pythonspinbox = QSpinBox()text = spinbox.text()spinbox.setFixedWidth( spinbox.lineEdit().fontMetrics().width(text) )
C++ (Qt)while(!asleep()) sheep++;