PyQt6: AttributeError Qt

Viewed 1257

I need to translate the following code from PyQt5 (It works there) to PyQt6:

self.setWindowFlags(Qt.FramelessWindowHint)

This is the error:

AttributeError: type object 'Qt' has no attribute 'FramelessWindowHint'

I've already tried this:

self.setWindowFlags(Qt.WindowFlags.FramelessWindowHint)

It says:

AttributeError: type object 'Qt' has no attribute 'WindowFlags'
1 Answers

That flag now lives here:

QtCore.Qt.WindowType.FramelessWindowHint
Related