diff --git a/GUIElements.py b/GUIElements.py index 929b04a..4fb85a1 100644 --- a/GUIElements.py +++ b/GUIElements.py @@ -310,3 +310,11 @@ class OptionalInputSection: for widget in self.optinputs: widget.setEnabled(False) + +class FCTable(QtGui.QTableWidget): + def __init__(self, parent=None): + super(FCTable, self).__init__(parent) + + def sizeHint(self): + default_hint_size = super(FCTable, self).sizeHint() + return QtCore.QSize(EDIT_SIZE_HINT, default_hint_size.height()) diff --git a/ObjectUI.py b/ObjectUI.py index 532066f..6ef00f2 100644 --- a/ObjectUI.py +++ b/ObjectUI.py @@ -1,7 +1,7 @@ import sys from PyQt4 import QtGui, QtCore #from GUIElements import * -from GUIElements import FCEntry, FloatEntry, EvalEntry, FCCheckBox, \ +from GUIElements import FCEntry, FloatEntry, EvalEntry, FCCheckBox, FCTable, \ LengthEntry, FCTextArea, IntEntry, RadioSet, OptionalInputSection @@ -443,8 +443,9 @@ class ExcellonObjectUI(ObjectUI): "Tools in this Excellon object." ) self.custom_box.addWidget(self.tools_table_label) - self.tools_table = QtGui.QTableWidget() + self.tools_table = FCTable() self.tools_table.setFixedHeight(100) + self.custom_box.addWidget(self.tools_table) #### Create CNC Job ####