main.qml 906 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import QtQuick 2.15
  2. import QtQuick.Window 2.15
  3. import QtQuick.Controls 2.15
  4. import myqml 1.0
  5. Window {
  6. id: window
  7. width: 640
  8. height: 480
  9. visible: true
  10. title: qsTr("Hello World")
  11. Column {
  12. spacing: 10
  13. topPadding: 10
  14. AudioWaveform {
  15. id: waveform
  16. Timer {
  17. id: timer
  18. interval: 100
  19. repeat: false
  20. running: false
  21. onTriggered: {
  22. waveform.paintWaveForm()
  23. }
  24. }
  25. width: window.width
  26. height: 100
  27. onWidthChanged: {
  28. timer.restart()
  29. }
  30. }
  31. Spectrum {
  32. id: spectrum
  33. width: window.width
  34. height: 100
  35. }
  36. TimeDomainPlot {
  37. width: window.width
  38. height: 200
  39. }
  40. }
  41. }