TypeError: __init__() takes 1 positional argument but 2 were given

Rich Shepard rshepard at appl-ecosys.com
Thu Apr 29 20:42:59 BST 2021

On Thu, 29 Apr 2021, Ludovic Bellière wrote:

> Don't forget to add your content widgets to a layout, and then that layout
> to your window. I'm pretty sure content widgets (like a text area or
> whatever) will not be displayed unless they're within a layout.


The content on the imported module has the widgets in a grid layout and the
grid inserted in a container. I added the assignment,
self.setCentralWidget(self.sw), but it makes no difference.

I'll back up and re-read the PyQt5 book's section on QTabWidget and review
the code.

Thanks for you input,


More information about the PyQt mailing list