218 current = widget; |
218 current = widget; |
219 } |
219 } |
220 |
220 |
221 void UiGridContainer::end() { |
221 void UiGridContainer::end() { |
222 if(!col_expanding) { |
222 if(!col_expanding) { |
223 QLabel *filler = new QLabel(""); |
223 QSpacerItem *filler = new QSpacerItem(0, 0); |
224 x = max_x + 1; |
224 x = max_x + 1; |
225 grid->setColumnStretch(x, 1); |
225 grid->setColumnStretch(x, 1); |
226 grid->addWidget(filler, 0, x, 1, 1, 0); |
226 grid->addItem(filler, 0, x, 1, 1, 0); |
227 } |
227 } |
228 if(!row_expanding) { |
228 if(!row_expanding) { |
229 QLabel *filler = new QLabel(""); |
229 QSpacerItem *filler = new QSpacerItem(0, 0); |
230 y++; |
230 y++; |
231 grid->setRowStretch(y, 1); |
231 grid->setRowStretch(y, 1); |
232 grid->addWidget(filler, y, 0, 1, 1, 0); |
232 grid->addItem(filler, y, 0, 1, 1, 0); |
233 } |
233 } |
234 } |
234 } |
235 |
235 |
236 UIEXPORT UIWIDGET ui_grid_create(UiObject *obj, UiContainerArgs args) { |
236 UIEXPORT UIWIDGET ui_grid_create(UiObject *obj, UiContainerArgs args) { |
237 UiContainerPrivate *ctn = (UiContainerPrivate*)ui_obj_container(obj); |
237 UiContainerPrivate *ctn = (UiContainerPrivate*)ui_obj_container(obj); |