diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 44466701..e1e21104 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -646,8 +646,17 @@ class WaveformWidgetPG(QtGui.QWidget): self.label_layout.addWidget(self.status_label) for label in self.perm_labels: self.label_layout.addWidget(label) - self.label_layout.addWidget(self.syn_checkbox) - self.label_layout.addWidget(self.qcombo_processed) + mid_widget = QWidget() + right_widget = QWidget() + # use widgets as placeholder, so that child widgets keep position when others are hidden + mid_layout = QHBoxLayout() + right_layout = QHBoxLayout() + mid_layout.addWidget(self.syn_checkbox) + right_layout.addWidget(self.qcombo_processed) + mid_widget.setLayout(mid_layout) + right_widget.setLayout(right_layout) + self.label_layout.addWidget(mid_widget) + self.label_layout.addWidget(right_widget) self.syn_checkbox.setLayoutDirection(Qt.RightToLeft) self.label_layout.setStretch(0, 4) self.label_layout.setStretch(1, 0)