<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:large"><font size="2">Rich, as a general suggestion for your learning, why don't you build your GUI interactively with Qt Designer? That way you can look at the Python code that is generated by pyuic. It's very handy<br></font></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large"><font size="2">Tom</font><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 3, 2021 at 5:22 PM Rich Shepard <<a href="mailto:rshepard@appl-ecosys.com">rshepard@appl-ecosys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Running Slackware64-14.2, Python-3.7.2, PyQt-5.13.2.<br>
<br>
QGroupBox is a container holding layouts with widgets. I want to group six<br>
widgets -- in two rows -- into a groupbox. Having each row of widgets<br>
in a group with the same title was successful, but I'm failing at having<br>
both rows of widgets in a single group box.<br>
<br>
A minimal working example is attached.<br>
<br>
The problem is in lines 72 (and the following line):<br>
<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>
<br>
and<br>
<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.addWidget(tb1)<br>
AttributeError: 'QGroupBox' object has no attribute 'addWidget'<br>
<br>
I've not found an example of what I'm trying to do in Alan Moore's book or<br>
in my web searches. The latter have examples of single widgets in a<br>
QVBoxLayout, but not multiple widgets in each row.<br>
<br>
Looking forward to learning how to do this.<br>
<br>
TIA,<br>
<br>
Rich</blockquote></div>