GSpinBox: The initial text should be "0".

This commit is contained in:
Andreas Kling 2019-06-16 15:08:52 +02:00
parent 862682b1bb
commit 1db169244a
Notes: sideshowbarker 2024-07-19 13:34:40 +09:00

View File

@ -6,6 +6,7 @@ GSpinBox::GSpinBox(GWidget* parent)
: GWidget(parent)
{
m_editor = new GTextEditor(GTextEditor::Type::SingleLine, this);
m_editor->set_text("0");
m_editor->on_change = [this] {
bool ok;
int value = m_editor->text().to_uint(ok);