AttributeError: 'MainWindow' object has no attribute 'onWindowTitleChange'

While running your example, I get the error:
AttributeError: ‘MainWindow’ object has no attribute ‘onWindowTitleChange’

I had the same problem, it seems that this signal is no longer available in the Qt QMainWindow class.

The onWindowTitleChange is a custom-defined slot (see the bottom of the example file) which you need to add yourself. The signal windowTitleChange is connected to this.

# SLOT: This accepts a string, e.g. the window title, and prints it
def onWindowTitleChange(self, s):
    print(s)
1 Like

Thanks, that makes sense.