Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在寻找如何做到这一点,并且我找到了该主题出现的地方,但没有一个建议对我真正有用,即使它们似乎对提问者来说还可以(他们甚至没有列出什么import)。我遇到了,但无论我尝试如何导入( ,等) ,self.setWindowFlags(Qt.FramelessWindowHint)它似乎都不起作用。QtGui.FramelessWindowHintQtCore.FramelessWindowHint
import
self.setWindowFlags(Qt.FramelessWindowHint)
QtGui.FramelessWindowHint
QtCore.FramelessWindowHint
有任何想法吗?
您需要导入 QtCore ,因此代码将如下所示: self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
QtCore
self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
每当您看到Qt.他们正在谈论 QtCore 模块中的 Qt 类时,就会想起一些事情。
Qt.
希望这可以帮助