No MainWindow after refactoring

David Boddie david at boddie.org.uk
Sun Jun 20 00:40:37 BST 2021


On Sat Jun 19 14:25:45 BST 2021, Axel Rau wrote:

> The test app [1] in one module works fine (mainwindow opens and shows
> loaded data).
> After putting ZoneModel and Zone classes in separate modules (za.py,
> mode.py)[2], no MainWindow is displayed, just the app icon.

Does it produce any errors?

> model.py:
> 
> import dns.query, dns.resolver, dns.zone, dns.rdataset, dns.rdatatype
> 
> windowHeading = 'za - DNS zone admin'
> 
> class ZoneModel(QtCore.QAbstractTableModel):
>     def __init__(self, data=[[]], parent=None):
>         super().__init__(parent)
>         self.zone = Zone('some.do.main')
[...]

You didn't import QtCore in the model.py module.

David




More information about the PyQt mailing list