Update samples/General/SmallExamples/NumberTripletsGame/NumberTripletsGame.ring - Better Code - Remove extra loop
@@ -88,6 +88,8 @@ app = new qApp {
button[n][m] = new QPushButton(win)
next
next
+ LayoutButtonMain = new QVBoxLayout() {
+ setSpacing(C_LAYOUTSPACING)
for n = 1 to sizey
LayoutButtonRow[n] = new QHBoxLayout() {
setSpacing(C_LAYOUTSPACING)
@@ -95,18 +97,13 @@ app = new qApp {
AddWidget(button[m][n])
next
}
- next
- LayoutButtonMain = new QVBoxLayout() {
- setSpacing(C_LAYOUTSPACING)
- for n = 1 to sizey
AddLayout(LayoutButtonRow[n])
next
AddWidget(newGame)
}
- win.setLayout(LayoutButtonMain)
- win.show()
- pbegin()
+ setLayout(LayoutButtonMain)
show()
+ pbegin()
}
exec()
}
