简体   繁体   English

PyQt6 中 setWindowFlags 的模拟是什么?

[英]What is analog of setWindowFlags in PyQt6?

While trying to migrate pyqt5 code to pyqt6, i have occured a problem with setWindowFlags: self.setWindowFlags(Qt.WindowStaysOnTopHint) returns an error: AttributeError: type object 'Qt' has no attribute 'WindowStaysOnTopHint' .在尝试将 pyqt5 代码迁移到 pyqt6 时,我遇到了 setWindowFlags 的问题: self.setWindowFlags(Qt.WindowStaysOnTopHint)返回错误: AttributeError: type object 'Qt' has no attribute 'WindowStay' So wat is the similar in PyQt6?那么,PyQt6 中的相似之处是什么?

QtCore.Qt.WindowType.WindowStaysOnTopHint

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM