Important: Please read the Qt Code of Conduct -

Gauges in QML with Three.js

  • Hi,

    I'm using Qt.createQmlObject to create a gauge and then pipe the QML object to a texture in three.js using THREE.QtQuickItemTexture. I want to access some properties of gauge but having trouble doing so. Specifically items inside of GaugeStyle like tickmark and tickmarkLabel

    tickmarkLabel: Text {
       id: text
       text: styleData.value
       color: "#000000"
       x: 15
    tickmark: Rectangle {
       implicitHeight: 1
       implicitWidth: 6
       antialiasing: true
       color: "#000000"

    Specifically I want to be able to modify the color property programmatically in JavaScript. I normally do this using the property alias but when I try to use it for these color properties it says anything within style: GaugeStyle is undefinated. My structure is:

    //some property alias
       //some anchors
          style: GaugeStyle
              valueBar: { //some code }
              tickmarkLabel: Text { color: //some color }
              tickmark: Rectangle { color: //some color }
              minorTickmark: Rectangle { color: //some color }

    Thank you for reading and any help you may provide.


Log in to reply