[PyQt] Broken examples in PyQt5

Phil Thompson phil at riverbankcomputing.com
Fri Jul 26 08:00:08 BST 2013


On Thu, 25 Jul 2013 19:35:03 +0400, Dmitry Shachnev <mitya57 at ubuntu.com>
wrote:
> Two examples, namely mainwindows/menus.py and
mainwindows/separations.py,
> fail with AttributeError here (using PyQt 5.0 and Qt 5.0.2):
> 
> Traceback (most recent call last):
>   File "./mainwindows/menus.py", line 284, in <module>
>     window = MainWindow()
>   File "./mainwindows/menus.py", line 71, in __init__
>     vbox.setMargin(5)
> AttributeError: 'QVBoxLayout' object has no attribute 'setMargin'
> 
> Traceback (most recent call last):
>   File "./mainwindows/separations.py", line 484, in <module>
>     window = Viewer()
>   File "./mainwindows/separations.py", line 272, in __init__
>     self.setCentralWidget(self.createCentralWidget())
>   File "./mainwindows/separations.py", line 330, in createCentralWidget
>     grid.setMargin(4)
> AttributeError: 'QGridLayout' object has no attribute 'setMargin'
> 
> Other examples I tested work fine. Is this a PyQt bug?

Bugs in the examples.

Thanks,
Phil


More information about the PyQt mailing list