Skip to content

Commit

Permalink
TableView: Fixed sizing issue with both 2d and 3d tables
Browse files Browse the repository at this point in the history
  • Loading branch information
malcom2073 committed Jul 31, 2014
1 parent b801064 commit c347569
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions core/src/tableview2d.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
<rect>
<x>0</x>
<y>0</y>
<width>1116</width>
<height>431</height>
<width>1009</width>
<height>529</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,6,0">
<layout class="QVBoxLayout" name="verticalLayout" stretch="6,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QCustomPlot" name="plot" native="true"/>
</item>
Expand Down
4 changes: 2 additions & 2 deletions core/src/tableviewnew3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit c347569

Please sign in to comment.