Qt Code:
  1. import QtQuick 2.0
  2. import QtQuick.Controls 1.1
  3.  
  4. Rectangle {
  5. id: root
  6. color: "#ffffff"
  7. width: 320
  8. height: 320
  9. border.width: 5
  10. border.color: "#000000"
  11.  
  12. Rectangle {
  13. id: mo
  14. x: 100
  15. y: 8
  16. width: 110
  17. height: 20
  18. border.width: 1
  19. border.color: "#000000"
  20. radius: 10
  21. focus: true
  22. }
  23.  
  24. TextEdit {
  25. id: textEdit1
  26. x: 100
  27. y: 8
  28. width: 110
  29. height: 20
  30. text: ctrl.name
  31. font.pixelSize: 12
  32. clip:true
  33. focus: true
  34. }
  35.  
  36. Button {
  37. id: button1
  38. x: 130
  39. y: 34
  40. width: 50
  41. height: 27
  42. focus: true
  43. text: qsTr("ارسال")
  44. onClicked: {
  45. ctrl.name = textEdit1.text
  46. ctrl.hello()
  47. }
  48.  
  49. }
  50.  
  51. Text {
  52. id: text1
  53. x: 100
  54. y: 67
  55. width: 110
  56. height: 23
  57. text: ctrl.message
  58. font.pixelSize: 12
  59. }
  60. }
To copy to clipboard, switch view to plain text mode