我需要将以下代码从 PyQt5 (它在那里工作)转换为 PyQt6:
self.setWindowFlags(Qt.FramelessWindowHint)
Run Code Online (Sandbox Code Playgroud)
这是错误:
AttributeError: type object 'Qt' has no attribute 'FramelessWindowHint'
Run Code Online (Sandbox Code Playgroud)
我已经尝试过这个:
self.setWindowFlags(Qt.WindowFlags.FramelessWindowHint)
Run Code Online (Sandbox Code Playgroud)
它说:
AttributeError: type object 'Qt' has no attribute 'WindowFlags'
Run Code Online (Sandbox Code Playgroud)