本文整理汇总了Python中PyQt5.QtCore.Qt.WindowMinimized方法的典型用法代码示例。如果您正苦于以下问题:Python Qt.WindowMinimized方法的具体用法?Python Qt.WindowMinimized怎么用?Python Qt.WindowMinimized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtCore.Qt
的用法示例。
在下文中一共展示了Qt.WindowMinimized方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: activateWindow
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def activateWindow(self):
if not self._activationWindow:
print("No registered ActivationWindow")
return
# Unfortunately this *doesn't* do much of any use, as it won't
# bring the window to the foreground under KDE... sigh.
self._activationWindow.setWindowState(
self._activationWindow.windowState() & ~Qt.WindowMinimized)
self._activationWindow.raise_()
self._activationWindow.requestActivate()
示例2: bring_to_front
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def bring_to_front(self):
self.setWindowState(self.windowState() & ~
Qt.WindowMinimized | Qt.WindowActive)
self.show()
self.activateWindow()
# Prevent QMenu from closing
示例3: _onMainWindowStateChanged
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def _onMainWindowStateChanged(self, window_state: int) -> None:
if self._tray_icon and self._tray_icon_widget:
visible = window_state == Qt.WindowMinimized
self._tray_icon_widget.setVisible(visible)
# Show toast message using System tray widget.
示例4: checkWindowMinimizedState
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def checkWindowMinimizedState(self) -> bool:
if self._main_window is not None and self._main_window.windowState() == Qt.WindowMinimized:
return True
else:
return False
示例5: activateWindow
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def activateWindow(self):
if not self._activationWindow:
return
self._activationWindow.setWindowState(self._activationWindow.windowState() & ~Qt.WindowMinimized)
self._activationWindow.raise_()
self._activationWindow.activateWindow()
示例6: show_top
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def show_top(self):
self.activateWindow()
self.setWindowState((self.windowState() & ~Qt.WindowMinimized) | Qt.WindowActive)
self.raise_()
self.show()
示例7: activateWindow
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def activateWindow(self):
if not self._activationWindow:
return
self._activationWindow.setWindowState(
self._activationWindow.windowState() & ~Qt.WindowMinimized)
self._activationWindow.raise_()
self._activationWindow.activateWindow()
示例8: activateWindow
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def activateWindow(self):
if not self._activationWindow:
return
self._activationWindow.show()
self._activationWindow.setWindowState(
self._activationWindow.windowState() & ~Qt.WindowMinimized)
self._activationWindow.raise_()
self._activationWindow.activateWindow()
示例9: bring_to_front
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowMinimized [as 别名]
def bring_to_front(self):
""" Brings the terminal window to the front and places the cursor in the textbox """
self._textbox.setFocus()
self.setWindowState(self.windowState() & ~Qt.WindowMinimized | Qt.WindowActive)
self.raise_()
self.activateWindow()
# Handlers that update the labels at the bottom