Python PyQt5.QtGui.QResizeEvent() Examples
The following are 14 code examples for showing how to use PyQt5.QtGui.QResizeEvent(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.
You may check out the related API usage on the sidebar.
You may also want to check out all available functions/classes of the module
PyQt5.QtGui
, or try the search function
.
Example 1
Project: track Author: frans-fuerst File: mainwindow.py License: Apache License 2.0 | 7 votes |
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)
Example 2
Project: qutebrowser Author: qutebrowser File: miscwidgets.py License: GNU General Public License v3.0 | 5 votes |
def resizeEvent(self, e: QResizeEvent) -> None: """Window resize event.""" super().resizeEvent(e) if self.count() == 2: self._adjust_size()
Example 3
Project: imperialism-remake Author: Trilarion File: qt.py License: GNU General Public License v3.0 | 5 votes |
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())
Example 4
Project: vidcutter Author: ozmartian File: videolist.py License: GNU General Public License v3.0 | 5 votes |
def resizeEvent(self, event: QResizeEvent) -> None: self.setFixedWidth(210 if self.verticalScrollBar().isVisible() else 190) self.parent.listheader.setFixedWidth(self.width())
Example 5
Project: nanovna-saver Author: NanoVNA-Saver File: Screenshot.py License: GNU General Public License v3.0 | 5 votes |
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))
Example 6
Project: nanovna-saver Author: NanoVNA-Saver File: Square.py License: GNU General Public License v3.0 | 5 votes |
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()
Example 7
Project: nanovna-saver Author: NanoVNA-Saver File: Frequency.py License: GNU General Public License v3.0 | 5 votes |
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()
Example 8
Project: nanovna-saver Author: NanoVNA-Saver File: TDR.py License: GNU General Public License v3.0 | 5 votes |
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
Example 9
Project: PyQt5 Author: andresnino File: barraTitulo.py License: MIT License | 5 votes |
def resizeEvent(self, QResizeEvent): super(barraTitulo, self).resizeEvent(QResizeEvent) self.frameTitulo.setFixedWidth(self.parent.width()) self.labelTitulo.setFixedWidth(self.parent.width()-62)
Example 10
Project: PyQt5 Author: andresnino File: barraTitulo.py License: MIT License | 5 votes |
def resizeEvent(self, QResizeEvent): super(barraTitulo, self).resizeEvent(QResizeEvent) self.frameTitulo.setFixedWidth(self.parent.width()) self.labelTitulo.setFixedWidth(self.parent.width()-202)
Example 11
Project: PyQt5 Author: andresnino File: barraTitulo.py License: MIT License | 5 votes |
def resizeEvent(self, QResizeEvent): super(barraTitulo, self).resizeEvent(QResizeEvent) self.frameTitulo.setFixedWidth(self.parent.width()) self.labelTitulo.setFixedWidth(self.parent.width()-202)
Example 12
Project: ezdxf Author: mozman File: cad_viewer.py License: MIT License | 5 votes |
def resizeEvent(self, event: qg.QResizeEvent) -> None: self.view.fit_to_scene()
Example 13
Project: urh Author: jopohl File: ModulatorDialog.py License: GNU General Public License v3.0 | 5 votes |
def resizeEvent(self, event: QResizeEvent): self.update_views()
Example 14
Project: urh Author: jopohl File: SpectrumDialogController.py License: GNU General Public License v3.0 | 5 votes |
def resizeEvent(self, event: QResizeEvent): if self.ui.graphicsViewSpectrogram and self.ui.graphicsViewSpectrogram.sceneRect(): self.ui.graphicsViewSpectrogram.fitInView(self.ui.graphicsViewSpectrogram.sceneRect())