当前位置: 首页>>代码示例>>Python>>正文


Python QtGui.QResizeEvent方法代码示例

本文整理汇总了Python中PyQt5.QtGui.QResizeEvent方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QResizeEvent方法的具体用法?Python QtGui.QResizeEvent怎么用?Python QtGui.QResizeEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.QtGui的用法示例。


在下文中一共展示了QtGui.QResizeEvent方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: event

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def event(self, e):
        if not isinstance(e, (
                QtCore.QEvent,
                QtCore.QChildEvent,
                QtCore.QDynamicPropertyChangeEvent,
                QtGui.QPaintEvent,
                QtGui.QHoverEvent,
                QtGui.QMoveEvent,
                QtGui.QEnterEvent,
                QtGui.QResizeEvent,
                QtGui.QShowEvent,
                QtGui.QPlatformSurfaceEvent,
                QtGui.QWindowStateChangeEvent,
                QtGui.QKeyEvent,
                QtGui.QWheelEvent,
                QtGui.QMouseEvent,
                QtGui.QFocusEvent,
                QtGui.QHelpEvent,
                QtGui.QHideEvent,
                QtGui.QCloseEvent,
                QtGui.QInputMethodQueryEvent,
                QtGui.QContextMenuEvent,
                )):
            log().warning("unknown event: %r %r", e.type(), e)
        return super().event(e) 
开发者ID:frans-fuerst,项目名称:track,代码行数:27,代码来源:mainwindow.py

示例2: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:
        super().resizeEvent(a0)
        if self.pixmap() is not None:
            self.setPixmap(
                self.pix.scaled(
                    self.size(),
                    QtCore.Qt.KeepAspectRatio,
                    QtCore.Qt.FastTransformation)) 
开发者ID:NanoVNA-Saver,项目名称:nanovna-saver,代码行数:10,代码来源:Screenshot.py

示例3: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, e: QResizeEvent) -> None:
        """Window resize event."""
        super().resizeEvent(e)
        if self.count() == 2:
            self._adjust_size() 
开发者ID:qutebrowser,项目名称:qutebrowser,代码行数:7,代码来源:miscwidgets.py

示例4: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, event: QtGui.QResizeEvent):  # noqa: N802
        """
        The view is resized. We need to fit the scene rectangle into the view without distorting the scene proportions.
        We also need to center on the center in order to keep the scene centered.
        """
        super().resizeEvent(event)
        scene_rect = self.sceneRect()
        self.fitInView(scene_rect, QtCore.Qt.KeepAspectRatio)
        self.centerOn(scene_rect.center()) 
开发者ID:Trilarion,项目名称:imperialism-remake,代码行数:11,代码来源:qt.py

示例5: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, event: QResizeEvent) -> None:
        self.setFixedWidth(210 if self.verticalScrollBar().isVisible() else 190)
        self.parent.listheader.setFixedWidth(self.width()) 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:5,代码来源:videolist.py

示例6: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:
        if not self.isPopout:
            self.setFixedWidth(a0.size().height())
            self.chartWidth = a0.size().height()-40
            self.chartHeight = a0.size().height()-40
        else:
            min_dimension = min(a0.size().height(), a0.size().width())
            self.chartWidth = self.chartHeight = min_dimension - 40
        self.update() 
开发者ID:NanoVNA-Saver,项目名称:nanovna-saver,代码行数:11,代码来源:Square.py

示例7: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:
        self.chartWidth = a0.size().width()-self.rightMargin-self.leftMargin
        self.chartHeight = a0.size().height() - self.bottomMargin - self.topMargin
        self.update() 
开发者ID:NanoVNA-Saver,项目名称:nanovna-saver,代码行数:6,代码来源:Frequency.py

示例8: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:
        super().resizeEvent(a0)
        self.chartWidth = self.width() - self.leftMargin - self.rightMargin
        self.chartHeight = self.height() - self.bottomMargin - self.topMargin 
开发者ID:NanoVNA-Saver,项目名称:nanovna-saver,代码行数:6,代码来源:TDR.py

示例9: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, QResizeEvent):
        super(barraTitulo, self).resizeEvent(QResizeEvent)
        self.frameTitulo.setFixedWidth(self.parent.width())
        self.labelTitulo.setFixedWidth(self.parent.width()-62) 
开发者ID:andresnino,项目名称:PyQt5,代码行数:6,代码来源:barraTitulo.py

示例10: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, QResizeEvent):
        super(barraTitulo, self).resizeEvent(QResizeEvent)
        self.frameTitulo.setFixedWidth(self.parent.width())
        self.labelTitulo.setFixedWidth(self.parent.width()-202) 
开发者ID:andresnino,项目名称:PyQt5,代码行数:6,代码来源:barraTitulo.py

示例11: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, event: qg.QResizeEvent) -> None:
        self.view.fit_to_scene() 
开发者ID:mozman,项目名称:ezdxf,代码行数:4,代码来源:cad_viewer.py

示例12: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, event: QResizeEvent):
        self.update_views() 
开发者ID:jopohl,项目名称:urh,代码行数:4,代码来源:ModulatorDialog.py

示例13: resizeEvent

# 需要导入模块: from PyQt5 import QtGui [as 别名]
# 或者: from PyQt5.QtGui import QResizeEvent [as 别名]
def resizeEvent(self, event: QResizeEvent):
        if self.ui.graphicsViewSpectrogram and self.ui.graphicsViewSpectrogram.sceneRect():
            self.ui.graphicsViewSpectrogram.fitInView(self.ui.graphicsViewSpectrogram.sceneRect()) 
开发者ID:jopohl,项目名称:urh,代码行数:5,代码来源:SpectrumDialogController.py


注:本文中的PyQt5.QtGui.QResizeEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。