Python PyQt5.QtGui.QResizeEvent() Examples
The following are 14
code examples of PyQt5.QtGui.QResizeEvent().
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 also want to check out all available functions/classes of the module
PyQt5.QtGui
, or try the search function
.
Example #1
Source File: mainwindow.py From track with Apache License 2.0 | 11 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
Source File: miscwidgets.py From qutebrowser with 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
Source File: qt.py From imperialism-remake with 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
Source File: videolist.py From vidcutter with 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
Source File: Screenshot.py From nanovna-saver with 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
Source File: Square.py From nanovna-saver with 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
Source File: Frequency.py From nanovna-saver with 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
Source File: TDR.py From nanovna-saver with 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
Source File: barraTitulo.py From PyQt5 with 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
Source File: barraTitulo.py From PyQt5 with 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
Source File: barraTitulo.py From PyQt5 with 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
Source File: cad_viewer.py From ezdxf with MIT License | 5 votes |
def resizeEvent(self, event: qg.QResizeEvent) -> None: self.view.fit_to_scene()
Example #13
Source File: ModulatorDialog.py From urh with GNU General Public License v3.0 | 5 votes |
def resizeEvent(self, event: QResizeEvent): self.update_views()
Example #14
Source File: SpectrumDialogController.py From urh with 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())