browser: recompute and load buttons side-by-side

This commit is contained in:
Robert Jördens 2016-07-09 18:43:36 +02:00
parent 6d0ae689e9
commit 5cfdaee46a
1 changed files with 2 additions and 4 deletions

View File

@ -85,16 +85,14 @@ class _ArgumentEditor(QtWidgets.QTreeWidget):
recompute_arguments.clicked.connect(self._recompute_arguments_clicked) recompute_arguments.clicked.connect(self._recompute_arguments_clicked)
load = QtWidgets.QPushButton("Set arguments from HDF5") load = QtWidgets.QPushButton("Set arguments from HDF5")
load.setToolTip("Set arguments from currently selected HDF5 " load.setToolTip("Set arguments from currently selected HDF5 file")
"file (Ctrl+Space)")
load.setIcon(QtWidgets.QApplication.style().standardIcon( load.setIcon(QtWidgets.QApplication.style().standardIcon(
QtWidgets.QStyle.SP_DialogApplyButton)) QtWidgets.QStyle.SP_DialogApplyButton))
load.setShortcut("CTRL+SPACE")
load.clicked.connect(self._load_clicked) load.clicked.connect(self._load_clicked)
buttons = LayoutWidget() buttons = LayoutWidget()
buttons.addWidget(recompute_arguments, 1, 1) buttons.addWidget(recompute_arguments, 1, 1)
buttons.addWidget(load, 2, 1) buttons.addWidget(load, 1, 2)
for i, s in enumerate((1, 0, 0, 1)): for i, s in enumerate((1, 0, 0, 1)):
buttons.layout.setColumnStretch(i, s) buttons.layout.setColumnStretch(i, s)
self.setItemWidget(widget_item, 1, buttons) self.setItemWidget(widget_item, 1, buttons)