5

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'
Art
  • 2,836
  • 4
  • 17
  • 34
Giorgio
  • 61
  • 1
  • 4

1 Answers1

7

That flag now lives here:

QtCore.Qt.WindowType.FramelessWindowHint
Passerby
  • 808
  • 1
  • 5
  • 9