本文整理汇总了Python中AnyQt.QtWidgets.QDialog.showEvent方法的典型用法代码示例。如果您正苦于以下问题:Python QDialog.showEvent方法的具体用法?Python QDialog.showEvent怎么用?Python QDialog.showEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnyQt.QtWidgets.QDialog
的用法示例。
在下文中一共展示了QDialog.showEvent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: showEvent
# 需要导入模块: from AnyQt.QtWidgets import QDialog [as 别名]
# 或者: from AnyQt.QtWidgets.QDialog import showEvent [as 别名]
def showEvent(self, event):
"""Overloaded to restore the geometry when the widget is shown
"""
QDialog.showEvent(self, event)
if self.save_position and not self.__was_restored:
# Restore saved geometry on show
self.__restoreWidgetGeometry()
self.__was_restored = True
self.__quicktipOnce()
示例2: showEvent
# 需要导入模块: from AnyQt.QtWidgets import QDialog [as 别名]
# 或者: from AnyQt.QtWidgets.QDialog import showEvent [as 别名]
def showEvent(self, event):
"""Overloaded to restore the geometry when the widget is shown
"""
QDialog.showEvent(self, event)
if self.save_position and not self.__was_restored:
# Restore saved geometry on (first) show
if self.__splitter is not None:
self.__splitter.setControlAreaVisible(self.controlAreaVisible)
self.__restoreWidgetGeometry()
self.__was_restored = True
self.__quicktipOnce()
示例3: showEvent
# 需要导入模块: from AnyQt.QtWidgets import QDialog [as 别名]
# 或者: from AnyQt.QtWidgets.QDialog import showEvent [as 别名]
def showEvent(self, event):
"""Overloaded to restore the geometry when the widget is shown
"""
QDialog.showEvent(self, event)
if self.save_position and not self.__was_restored:
# Restore saved geometry on (first) show
if self.__splitter is not None:
self.__setControlAreaVisible(self.controlAreaVisible)
if self.savedWidgetGeometry is not None:
self.__restoreWidgetGeometry(bytes(self.savedWidgetGeometry))
self.__was_restored = True
if not self.__was_shown:
# Mark as explicitly moved/resized if not already. QDialog would
# otherwise adjust position/size on subsequent hide/show
# (move/resize events coming from the window manager do not set
# these flags).
self.setAttribute(Qt.WA_Moved, True)
self.setAttribute(Qt.WA_Resized, True)
self.__was_shown = True
self.__quicktipOnce()
示例4: showEvent
# 需要导入模块: from AnyQt.QtWidgets import QDialog [as 别名]
# 或者: from AnyQt.QtWidgets.QDialog import showEvent [as 别名]
def showEvent(self, event):
# Clear the triggered action before show.
self.__triggeredAction = None
QDialog.showEvent(self, event)