def resizeEvent(self, event: QResizeEvent): if self.scene() and self._chartIsSet: self.scene().setSceneRect(QRectF(QPointF(0, 0), event.size())) self.chart().resize(event.size()) # Update axis self.setBestTickCount(event.size()) # Update coordinates tracker position (if tracker is active) self._updateMouseTrackerPosition() super().resizeEvent(event)
def eventFilter(self, watched: QtWidgets.QWidget, event: QResizeEvent): if event.type() == QEvent.Type.Resize: h = event.size().height() if event.size().width( ) - h >= self.controlPanelWidget.minimumWidth(): self.boardWidget.setFixedSize(h, h) self.gameLayout.removeWidget(self.controlPanelWidget) self.gameLayout.addWidget(self.controlPanelWidget, 0, 1) else: self.boardWidget.setFixedSize( h - self.controlPanelWidget.height(), h - self.controlPanelWidget.height()) self.gameLayout.removeWidget(self.controlPanelWidget) self.gameLayout.addWidget(self.controlPanelWidget, 1, 0) return True return super().eventFilter(watched, event)
def resizeEvent(self, evt: QResizeEvent): buttons_size = self._buttons.sizeHint() self._buttons.setGeometry( evt.size().width() - buttons_size.width(), 0, buttons_size.width(), buttons_size.height(), )
def resizeEvent(self, event: QtGui.QResizeEvent): super().resizeEvent(event) self.ui.all_day.setGeometry(QtCore.QRect( self.ui.all_day.x(), self.ui.all_day.y(), self.ui.all_day.width(), event.size().height(), ))
def resizeEvent(self, event: QResizeEvent) -> None: super().resizeEvent(event) if not self.resizeTimer.isActive() and event.size() != self.viewportCacheSize: self.viewportCacheSize = event.size() self.viewportCache = self.viewport().grab() self.resizeTimer.start()
def resizeEvent(self, event: QResizeEvent) -> None: self.__tempWidth = event.size().width() self.update()
def resizeEvent(self, event: QtGui.QResizeEvent): self.model().setDisplayWidth(event.size().width()) super().resizeEvent(event)
def resizeEvent(self, event: QResizeEvent): self._menu_bar.setGeometry(0, 0, event.size().width(), self._menu_bar.sizeHint().height())
def resizeEvent(self, event: QtGui.QResizeEvent) -> None: if self._layout.count() <= 0: return self._layout.itemAt(0).spacerItem().changeSize(0, event.size().height() // 2) self._layout.itemAt(self._layout.count() - 1).spacerItem().changeSize(0, event.size().height() // 2) self._layout.invalidate()