Fix stretchheaderview column widths too wide
This commit is contained in:
@@ -44,7 +44,10 @@ StretchHeaderView::StretchHeaderView(const Qt::Orientation orientation, QWidget
|
||||
: QHeaderView(orientation, parent),
|
||||
stretch_enabled_(false),
|
||||
in_mouse_move_event_(false) {
|
||||
|
||||
connect(this, SIGNAL(sectionResized(int,int,int)), SLOT(SectionResized(int,int,int)));
|
||||
setMinimumSectionSize(kMinimumColumnWidth);
|
||||
|
||||
}
|
||||
|
||||
void StretchHeaderView::setModel(QAbstractItemModel *model) {
|
||||
@@ -92,9 +95,6 @@ void StretchHeaderView::UpdateWidths(const QList<int> §ions) {
|
||||
const ColumnWidthType w = column_widths_[i];
|
||||
int pixels = w * width();
|
||||
|
||||
if (pixels != 0 && total_w - int(total_w) > 0.5)
|
||||
pixels ++;
|
||||
|
||||
total_w += w;
|
||||
|
||||
if (!sections.isEmpty() && !sections.contains(i))
|
||||
|
||||
Reference in New Issue
Block a user