Table width on Excellon options group fixed

This commit is contained in:
HDR
2016-07-18 14:43:04 +06:00
parent 3d5beed488
commit 4e00cf4380
2 changed files with 11 additions and 2 deletions

View File

@@ -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())

View File

@@ -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 ####