History

Increase initial width of the edit fields in JavaScript Window.form()

David Rowe committed 12 years ago

Commit eecdc2d1 parent 040254a1 file · +4 −2Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+4−2
@@ -127,8 +127,10 @@ QScriptValue WindowScriptingInterface::showForm(const QString& title, QScriptVal · 126 unmodified lines
127127 if (item.property("button").toString() != "") {
128128 cancelButton = cancelButton || item.property("button").toString().toLower() == "cancel";
129129 } else {
130− edits.push_back(new QLineEdit(item.property("value").toString()));
131− formLayout->addRow(item.property("label").toString(), edits.back());
130+ QLineEdit* edit = new QLineEdit(item.property("value").toString());
131+ edit->setMinimumWidth(200);
132+ edits.push_back(edit);
133+ formLayout->addRow(new QLabel(item.property("label").toString()), edit);
132134 }
133135 }
134136