瀏覽代碼

Green sales window: coffee column expands to content. Fixes #56

Neal Wilson 11 年之前
父節點
當前提交
7432e29484
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. 4
    0
      config/Windows/greensales.xml

+ 4
- 0
config/Windows/greensales.xml 查看文件

42
 			var dateField = findChildObject(this, 'date');
42
 			var dateField = findChildObject(this, 'date');
43
 			var customerField = findChildObject(this, 'customer');
43
 			var customerField = findChildObject(this, 'customer');
44
 			var items = findChildObject(this, 'coffees');
44
 			var items = findChildObject(this, 'coffees');
45
+			var model = items.model();
46
+			model.dataChanged.connect(function() {
47
+				items.resizeColumnToContents(0);
48
+			});
45
 			var submit = findChildObject(this, 'submit');
49
 			var submit = findChildObject(this, 'submit');
46
 			submit.clicked.connect(function() {
50
 			submit.clicked.connect(function() {
47
 				var query = new QSqlQuery();
51
 				var query = new QSqlQuery();

Loading…
取消
儲存