瀏覽代碼

Layout margin and spacing settable from XML attributes.

Neal Wilson 11 年之前
父節點
當前提交
3078954beb
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9
    0
      src/typica.w

+ 9
- 0
src/typica.w 查看文件

@@ -4181,6 +4181,15 @@ if(element.hasAttribute("id"))
4181 4181
 {
4182 4182
 	layout->setObjectName(element.attribute("id"));
4183 4183
 }
4184
+if(element.hasAttribute("spacing"))
4185
+{
4186
+	layout->setSpacing(element.attribute("spacing").toInt());
4187
+}
4188
+if(element.hasAttribute("margin"))
4189
+{
4190
+	int m = element.attribute("margin").toInt();
4191
+	layout->setContentsMargins(m, m, m, m);
4192
+}
4184 4193
 
4185 4194
 @ Stacked layouts are a bit different from the other types. A stacked layout has
4186 4195
 an arbitrary number of {\tt <page>} children which are just a |QWidget| which

Loading…
取消
儲存