Hi all,

When creating a CircularGauge, the CircularGauge element always consumes the total area as if the entire circle of the gauge were displayed, even if the minimumValue angle and maximumValueAngle combinations result in a half-circle or less.

Is there a way to force the CircularGauge element to take no more vertical room than required to display the visible portion of the gauge?

See, for example, the following image and code -- the desired outcome is that the black box stops at the bottom of the visible portion of the gauge, not where a full-circle gauge would have gone.

Thanks in advance for any advice!

gauge.png

Qt Code:
  1. import QtQuick 2.5
  2. import QtQuick.Window 2.2
  3. import QtQuick.Controls 1.4
  4. import QtQuick.Controls.Styles 1.4
  5. import QtQuick.Extras 1.4
  6. import QtQuick.Layouts 1.1
  7. import QtQuick.Extras.Private 1.0
  8.  
  9. Window {
  10. visible: true
  11. width: 640
  12. height: 480
  13. title: qsTr("Hello World")
  14.  
  15. MainForm {
  16. anchors.fill: parent
  17.  
  18.  
  19. Column {
  20.  
  21. spacing: 2
  22.  
  23.  
  24. Rectangle {
  25. width: 400
  26. height: 200
  27. color: "#000000"
  28.  
  29. CircularGauge {
  30.  
  31. width: 400
  32. height: 200
  33.  
  34. style: CircularGaugeStyle {
  35. maximumValueAngle: 90
  36. minimumValueAngle: -90
  37.  
  38.  
  39. }
  40. }
  41. }
  42.  
  43.  
  44. Rectangle {
  45.  
  46. color: "#ccffcc"
  47. border.color: "black"
  48.  
  49. height: 75
  50. width: 50
  51.  
  52. }
  53. }
  54. }
  55. }
To copy to clipboard, switch view to plain text mode