23#ifndef BCETABLEVIEW_HPP
24#define BCETABLEVIEW_HPP
27#include <QAbstractItemView>
43 setSelectionMode(QAbstractItemView::ContiguousSelection);
44 setEditTriggers(QAbstractItemView::AllEditTriggers);
45 setSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding);
59 QSize hint(QTableView::sizeHint());
62 model()->columnCount();
64 for (
int col = 0; col < model()->columnCount(); col++)
65 newWidth += columnWidth(col);
66 newWidth += verticalHeader()->sizeHint().width();
69 for (
int row = 0; row < model()->rowCount(); row++)
70 newHeight += rowHeight(row);
72 newHeight += horizontalHeader()->sizeHint().height();
74 hint.setHeight(newHeight);
75 hint.setWidth(newWidth);
Specialized table view for BCEViewer.
Definition: bcetableview.hpp:36
int sizeHintForColumn(int col) const
Reimplement column size to be slightly smaller.
Definition: bcetableview.hpp:49
QSize minimumSizeHint() const
Reimplement minimumSizeHint.
Definition: bcetableview.hpp:57
BCETableView()
Constructor.
Definition: bcetableview.hpp:41
QSize sizeHint() const
Hint is equal to minimum size so table wont grow.
Definition: bcetableview.hpp:81