FooterForm.ui.qml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import QtQuick 2.4
  2. import QtQuick.Controls 2.4
  3. import QtQuick.Layouts 1.3
  4. Page {
  5. width: 1280
  6. height: 70
  7. font.capitalization: Font.MixedCase
  8. Connections {
  9. target: _qmlHandler
  10. onFooterSetStatus: {
  11. footerStatusText.text = status
  12. }
  13. onFooterSetError: {
  14. footerErrorText.text = "Error: " + error
  15. timer.start()
  16. }
  17. }
  18. Rectangle {
  19. anchors.fill: parent
  20. color: "#c4c4c4"
  21. ColumnLayout {
  22. spacing: 3
  23. anchors.fill: parent
  24. Text {
  25. id: footerStatusText
  26. Layout.preferredWidth: parent.width
  27. text: qsTr("")
  28. Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
  29. verticalAlignment: Text.AlignVCenter
  30. font.pixelSize: 23
  31. }
  32. Text {
  33. id: footerErrorText
  34. Layout.preferredWidth: parent.width
  35. color: "#fa3737"
  36. text: qsTr("")
  37. Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
  38. verticalAlignment: Text.AlignVCenter
  39. font.pixelSize: 23
  40. }
  41. }
  42. }
  43. Timer {
  44. id: timer
  45. interval: 5000
  46. onTriggered: {
  47. footerErrorText.text = ""
  48. }
  49. }
  50. }