mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-26 03:38:25 +08:00
gui: auto resize of table columns
This commit is contained in:
parent
0b10f72c2b
commit
aa2acb9137
@ -23,6 +23,8 @@ class LogDock(dockarea.Dock):
|
|||||||
|
|
||||||
self.log = QtGui.QTableView()
|
self.log = QtGui.QTableView()
|
||||||
self.log.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
self.log.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
||||||
|
self.log.horizontalHeader().setResizeMode(
|
||||||
|
QtGui.QHeaderView.ResizeToContents)
|
||||||
self.addWidget(self.log)
|
self.addWidget(self.log)
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
@ -39,6 +39,8 @@ class ParametersDock(dockarea.Dock):
|
|||||||
|
|
||||||
self.table = QtGui.QTableView()
|
self.table = QtGui.QTableView()
|
||||||
self.table.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
|
self.table.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
|
||||||
|
self.table.horizontalHeader().setResizeMode(
|
||||||
|
QtGui.QHeaderView.ResizeToContents)
|
||||||
grid.addWidget(self.table, 1, 0)
|
grid.addWidget(self.table, 1, 0)
|
||||||
|
|
||||||
def search_parameters(self):
|
def search_parameters(self):
|
||||||
|
@ -39,6 +39,8 @@ class ResultsDock(dockarea.Dock):
|
|||||||
|
|
||||||
self.table = QtGui.QTableView()
|
self.table = QtGui.QTableView()
|
||||||
self.table.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
self.table.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
||||||
|
self.table.horizontalHeader().setResizeMode(
|
||||||
|
QtGui.QHeaderView.ResizeToContents)
|
||||||
grid.addWidget(self.table, 0, 0)
|
grid.addWidget(self.table, 0, 0)
|
||||||
|
|
||||||
add_display_box = QtGui.QGroupBox("Add display")
|
add_display_box = QtGui.QGroupBox("Add display")
|
||||||
|
@ -54,6 +54,8 @@ class ScheduleDock(dockarea.Dock):
|
|||||||
self.table = QtGui.QTableView()
|
self.table = QtGui.QTableView()
|
||||||
self.table.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
|
self.table.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
|
||||||
self.table.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
|
self.table.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
|
||||||
|
self.table.horizontalHeader().setResizeMode(
|
||||||
|
QtGui.QHeaderView.ResizeToContents)
|
||||||
self.addWidget(self.table)
|
self.addWidget(self.table)
|
||||||
|
|
||||||
self.table.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
self.table.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||||
|
Loading…
Reference in New Issue
Block a user