Hi<div><br></div><div>I hope to delete and create a new layout without destroying a widget, based on Qt documentation, </div><div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-style-span" style="color: rgb(54, 53, 52); font-family: Verdana; line-height: 20px; "><font class="Apple-style-span" size="4">If there already is a layout manager installed on this widget, <a href="http://doc.qt.nokia.com/4.7/qwidget.html" style="color: rgb(0, 115, 47); text-decoration: none; ">QWidget</a> won't let you install another. You must first delete the existing layout manager (returned by <a href="http://doc.qt.nokia.com/4.7/qwidget.html#layout" style="color: rgb(0, 115, 47); text-decoration: none; ">layout</a>()) before you can call setLayout() with the new layout.</font></span></blockquote>
<div><br></div><div><span class="Apple-style-span" style="color: rgb(54, 53, 52); font-family: Verdana; font-size: 13px; line-height: 20px; "></span>to add a layout to an existing widgets, I find something like</div><div>
<br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><pre>void myWidget::makeLayout()
{
// Delete old layout (if any)
delete layout(); // This is QWidget::layout()
// Perhaps you have to remove, add, hide or show some childwidgets.
.....
...
}</pre></span></div><div>So how to do that in R, I cannot find something like close() or delete() for QWidget$layout(). </div><div><br></div><div>Thanks</div><div><br></div><div>Tengfei</div><div><br clear="all"><br>-- <br>
Tengfei Yin<br>MCDB PhD student <br>1620 Howe Hall, 2274,<br>Iowa State University<br>Ames, IA,50011-2274<br>Homepage: <a href="http://www.tengfei.name" target="_blank">www.tengfei.name</a><br><div><br></div><br>
</div>