Typica is a free program for professional coffee roasters. https://typica.us
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132
  1. <window id="editinvoice">
  2. <layout type="vertical">
  3. <layout type="horizontal">
  4. <label>Invoice:</label>
  5. <line id="invoice" />
  6. </layout>
  7. <layout type="horizontal">
  8. <button type="push" id="cancel" name="Cancel" />
  9. <button type="push" id="submit" name="Submit" />
  10. </layout>
  11. </layout>
  12. <program>
  13. <![CDATA[
  14. var window = this;
  15. var submit = findChildObject(this, 'submit');
  16. var invoiceLine = findChildObject(this, 'invoice');
  17. submit.clicked.connect(function() {
  18. var query = new QSqlQuery();
  19. query.prepare("UPDATE invoices SET invoice = :invoice WHERE id = :id");
  20. query.bind(":invoice", invoiceLine.text);
  21. query.bind(":id", window.invoiceID);
  22. query.exec();
  23. query = query.invalidate;
  24. window.close();
  25. });
  26. var cancel = findChildObject(this, 'cancel');
  27. cancel.clicked.connect(function() {
  28. window.close();
  29. });
  30. ]]>
  31. </program>
  32. </window>