forked from M-Labs/artiq
moninj: change to vboxlayout
This commit is contained in:
parent
d3308e551c
commit
a7478a907c
|
@ -8,7 +8,6 @@ from PyQt5 import QtCore, QtWidgets
|
|||
from artiq.coredevice.comm_moninj import CommMonInj, TTLOverride, TTLProbe
|
||||
from artiq.coredevice.ad9912_reg import AD9912_SER_CONF
|
||||
from artiq.gui.tools import LayoutWidget
|
||||
from artiq.gui.flowlayout import FlowLayout
|
||||
from artiq.gui.models import DictSyncTreeSepModel
|
||||
|
||||
|
||||
|
@ -840,15 +839,19 @@ class MonInjDock(QtWidgets.QDockWidget):
|
|||
layout.addWidget(add_channel_btn, 0, 0, colspan=1)
|
||||
scroll_area = QtWidgets.QScrollArea()
|
||||
layout.addWidget(scroll_area, 1, 0, colspan=10)
|
||||
self.grid = FlowLayout()
|
||||
self.grid = QtWidgets.QVBoxLayout()
|
||||
self.spacer = QtWidgets.QSpacerItem(50, 500, QtWidgets.QSizePolicy.Ignored,
|
||||
QtWidgets.QSizePolicy.Fixed)
|
||||
grid_widget = QtWidgets.QWidget()
|
||||
grid_widget.setLayout(self.grid)
|
||||
scroll_area.setWidgetResizable(True)
|
||||
scroll_area.setWidget(grid_widget)
|
||||
|
||||
def layout_widgets(self, handlers):
|
||||
self.grid.removeItem(self.spacer)
|
||||
for handler in handlers:
|
||||
self.grid.addWidget(handler.widget)
|
||||
self.grid.insertItem(-1, self.spacer)
|
||||
|
||||
def set_channels(self, handlers):
|
||||
self._channel_model.clear()
|
||||
|
|
Loading…
Reference in New Issue