def setWindowFlags(self, flags):
super(PreviewWindow, self).setWindowFlags(flags)
flag_type = (flags & Qt.WindowType_Mask)
if flag_type == Qt.Window:
text = "Qt.Window"
elif flag_type == Qt.Dialog:
text = "Qt.Dialog"
elif flag_type == Qt.Sheet:
text = "Qt.Sheet"
elif flag_type == Qt.Drawer:
text = "Qt.Drawer"
elif flag_type == Qt.Popup:
text = "Qt.Popup"
elif flag_type == Qt.Tool:
text = "Qt.Tool"
elif flag_type == Qt.ToolTip:
text = "Qt.ToolTip"
elif flag_type == Qt.SplashScreen:
text = "Qt.SplashScreen"
else:
text = ""
if flags & Qt.MSWindowsFixedSizeDialogHint:
text += "\n| Qt.MSWindowsFixedSizeDialogHint"
if flags & Qt.X11BypassWindowManagerHint:
text += "\n| Qt.X11BypassWindowManagerHint"
if flags & Qt.FramelessWindowHint:
text += "\n| Qt.FramelessWindowHint"
if flags & Qt.WindowTitleHint:
text += "\n| Qt.WindowTitleHint"
if flags & Qt.WindowSystemMenuHint:
text += "\n| Qt.WindowSystemMenuHint"
if flags & Qt.WindowMinimizeButtonHint:
text += "\n| Qt.WindowMinimizeButtonHint"
if flags & Qt.WindowMaximizeButtonHint:
text += "\n| Qt.WindowMaximizeButtonHint"
if flags & Qt.WindowCloseButtonHint:
text += "\n| Qt.WindowCloseButtonHint"
if flags & Qt.WindowContextHelpButtonHint:
text += "\n| Qt.WindowContextHelpButtonHint"
if flags & Qt.WindowShadeButtonHint:
text += "\n| Qt.WindowShadeButtonHint"
if flags & Qt.WindowStaysOnTopHint:
text += "\n| Qt.WindowStaysOnTopHint"
if flags & Qt.WindowStaysOnBottomHint:
text += "\n| Qt.WindowStaysOnBottomHint"
if flags & Qt.CustomizeWindowHint:
text += "\n| Qt.CustomizeWindowHint"
self.textEdit.setPlainText(text)
testwindowflags.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录