From c3475692785d821801b7895494aa08174a621f72 Mon Sep 17 00:00:00 2001 From: Michael Carpenter Date: Wed, 30 Jul 2014 22:24:31 -0400 Subject: [PATCH] TableView: Fixed sizing issue with both 2d and 3d tables --- core/src/tableview2d.ui | 9 ++++++--- core/src/tableviewnew3d.cpp | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/src/tableview2d.ui b/core/src/tableview2d.ui index 0094dba..49b37e6 100644 --- a/core/src/tableview2d.ui +++ b/core/src/tableview2d.ui @@ -6,8 +6,8 @@ 0 0 - 1116 - 431 + 1009 + 529 @@ -15,7 +15,10 @@ - + + + QLayout::SetDefaultConstraint + diff --git a/core/src/tableviewnew3d.cpp b/core/src/tableviewnew3d.cpp index b951d36..98bc091 100644 --- a/core/src/tableviewnew3d.cpp +++ b/core/src/tableviewnew3d.cpp @@ -27,8 +27,8 @@ void TableViewNew3D::addHotkey(int key,Qt::KeyboardModifier modifier) void TableViewNew3D::resizeEvent(QResizeEvent *evt) { - m_itemWidth = this->width() / 25; - m_itemHeight = this->height() / 20; + m_itemWidth = this->width() / (m_columnCount + 1); + m_itemHeight = this->height() / (m_rowCount + 1); this->update(); }