<div dir="ltr"><div dir="ltr"><div dir="ltr">Il giorno lun 3 mag 2021 alle ore 19:02 Rich Shepard <<a href="mailto:rshepard@appl-ecosys.com" target="_blank">rshepard@appl-ecosys.com</a>> ha scritto:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> - change all tb1.layout().addWidget(...) to tb1.addWidget(...);<br>
> - you can access the layout set on a widget by using widget.layout(), but<br>
> since you're creating it in the same scope, there's no need for that: just<br>
> create it with a reference and use that afterwards: tboxLayout =<br>
> qtw.QVBoxLayout(tbox);<br>
> - add the child layout correctly: tboxLayout..addLayout(tb1);<br>
> - set the *main* layout for your widget, otherwise you'll certainly face<br>
> some issues:<br>
>        mainLayout = qtw.QVBoxLayout(self)<br>
>        mainLayout.addWidget(tbox)<br>
<br>
Maurizio,<br>
<br>
Still the same error:<br>
$ python biomwe.py <br>
Traceback (most recent call last):<br>
   File "biomwe.py", line 92, in <module><br>
     bio = BiotaWindow()<br>
   File "biomwe.py", line 72, in __init__<br>
     tbox.addLayout(tb1)<br>
AttributeError: 'QGroupBox' object has no attribute 'addLayout'<br></blockquote><div><br></div><div>Please, read more carefully.</div><div>I used "tboxLayout", not "tbox":</div><div><br></div><div>tboxLayout..addLayout(tb1)<br></div><div><br></div><div>That tboxLayout refers to the previous point in my list, in which I created that object as the layout to which you add the other child layouts.</div><div><br></div><div>Maurizio</div><div><br></div></div>-- <br><div dir="ltr">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div></div></div>