def showEvent(self, event: QtGui.QShowEvent): """ Initialize column and row sizes on the first time the widget is shown """ if not self._loaded: # Set column widths for column_index in range(self.columnHeader.model().columnCount()): self.auto_size_column(column_index) # Set row heights # Just sets a single uniform row height based on the first N rows for performance. N = 100 default_row_height = 30 for row_index in range(self.indexHeader.model().rowCount())[:N]: self.auto_size_row(row_index) height = self.indexHeader.rowHeight(row_index) default_row_height = max(default_row_height, height) # Set limit for default row height default_row_height = min(default_row_height, 100) self.indexHeader.verticalHeader().setDefaultSectionSize(default_row_height) self.dataView.verticalHeader().setDefaultSectionSize(default_row_height) self._loaded = True event.accept()
def showEvent(self, a0: QtGui.QShowEvent) -> None: if self.main_viewer.CohortTreeWidget.head is None: self.main_viewer.spawn_popup( "No Loaded Cohort", "Please load a cohort before loading a plugin...") a0.ignore() return else: return super().showEvent(a0)
def showEvent(self, event: QShowEvent) -> None: self.nextButton.setDefault(True) self.nextButton.setFocus(Qt.OtherFocusReason) event.accept()
def showEvent(self, event: QtGui.QShowEvent): if not self._loaded: for column_index in range(self.columnHeader.model().columnCount()): self.auto_size_column(column_index) self._loaded = True event.accept()
def showEvent(self, a0: QtGui.QShowEvent): a0.accept() self.ui.slider_value.setValue(self.pin.value) self.ui.spinbox_value.setValue(self.pin.value)
def showEvent(self, a0: QtGui.QShowEvent): a0.accept() self.ui.slider_frequency.setValue(self.pin.frequency) self.ui.spinbox_frequency.setValue(self.pin.frequency) self.ui.spinbox_duty_cycle.setValue(self.pin.duty_cycle) self.ui.slider_duty_cycle.setValue(self.pin.duty_cycle)