use PyQt5 When , We often use it setWindowFlags To add properties to the window , Sometimes you want to use more than one logo at the same time . For example, the window should have no title bar and be fixed at the front , The required code is :

self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint)
At this point, someone will say , My code is the same, how can I only use one parameter ?
Here are two cases , One is correct , The other will report a mistake
self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint) self.
setWindowFlag(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint)

See the difference ? Yes , Just one less ’s’, This is the difference between one and one or more . When I use it , This is what I started with , At that time, only one parameter is required , Later, when you need to add the second one, you will report an error . This one s I've been suffering for a long time , Take this as a warning .
And then I found the definition of two functions , It is found that these two functions are different in addition to this point
def setWindowFlag(self, Qt_WindowType, on=True): # real signature unknown;
restored from __doc__ """ setWindowFlag(self, Qt.WindowType, on: bool = True)
""" pass def setWindowFlags(self, Union, Qt_WindowFlags=None, Qt_WindowType=None
): # real signature unknown; restored from __doc__ """ setWindowFlags(self,
Union[Qt.WindowFlags, Qt.WindowType]) """ pass

Technology
©2019-2020 Toolsou All rights reserved,
In the problem of target detection “ recall Recall”,“ Accuracy Precision”Linux Page replacement algorithm C Language implementation About wechat payment body( Product description ) Problems encountered stay Vue Use in Web Worker Calculate the working days of each month c++ Memory Pointer out of bounds detection mechanism _CrtMemBlockHeadeJavaScript Medium Call and Apply Remember once EventBus Project issues caused by memory leaks Hundreds of millions of locusts rarely collide Locusts want to be self driving Heroes Java Swing JList: List box components