Browse Source

Add stretch attribute to web view

Neal Wilson 7 years ago
parent
commit
a62e3c2d3f
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      src/webview.w

+ 6
- 1
src/webview.w View File

@@ -191,12 +191,17 @@ void addWebViewToLayout(QDomElement element, QStack<QWidget *> *,
191 191
                         QStack<QLayout *> *layoutStack)
192 192
 {
193 193
 	TypicaWebView *view = new TypicaWebView;
194
+	int stretch = 0;
194 195
 	if(element.hasAttribute("id"))
195 196
 	{
196 197
 		view->setObjectName(element.attribute("id"));
197 198
 	}
199
+	if(element.hasAttribute("stretch"))
200
+	{
201
+        stretch = element.attribute("stretch").toInt();
202
+	}
198 203
 	QBoxLayout *layout = qobject_cast<QBoxLayout *>(layoutStack->top());
199
-	layout->addWidget(view);
204
+	layout->addWidget(view, stretch);
200 205
 }
201 206
 
202 207
 @ Prototypes must be provided for these functions.

Loading…
Cancel
Save