mirror of https://gitlab.com/pamhyr/pamhyr2
Network: Set table column resize as stretch.
parent
109cfc395a
commit
26bb8d5beb
|
|
@ -8,7 +8,7 @@ from PyQt5.QtCore import (
|
|||
from PyQt5.QtWidgets import (
|
||||
QTableView, QItemDelegate, QComboBox, QLineEdit, QHBoxLayout, QSlider,
|
||||
QPushButton, QCheckBox, QStyledItemDelegate, QStyleOptionButton, QStyle,
|
||||
QApplication, QToolBar, QAction,
|
||||
QApplication, QToolBar, QAction, QHeaderView, QAbstractItemView,
|
||||
)
|
||||
|
||||
from Model.River import RiverNode, RiverReach, River
|
||||
|
|
@ -44,6 +44,9 @@ class NetworkWindow(ASubMainWindow):
|
|||
table.setModel(self.nodes_model)
|
||||
#table.resizeColumnsToContents()
|
||||
|
||||
table.setSelectionBehavior(QAbstractItemView.SelectRows)
|
||||
table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||
|
||||
# Edges table
|
||||
|
||||
self.reachs_model = GraphTableModel(
|
||||
|
|
@ -64,6 +67,8 @@ class NetworkWindow(ASubMainWindow):
|
|||
table.setItemDelegateForColumn(1, self.delegate_true_false_combobox)
|
||||
table.setItemDelegateForColumn(2, self.delegate_combobox)
|
||||
table.setItemDelegateForColumn(3, self.delegate_combobox)
|
||||
table.setSelectionBehavior(QAbstractItemView.SelectRows)
|
||||
table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||
#table.resizeColumnsToContents()
|
||||
|
||||
# Connection
|
||||
|
|
|
|||
Loading…
Reference in New Issue