Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › LineItem opacity

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5935

    Heini

    Hi,

    it seems that the LineItems opacity property does not work. Setting it to 0 does not hide the line, while visible:false works fine. The problem is, that I would like to fade it out with a NumberAnimation, so I need to use opacity.

    Greetings

    Heini

    #5940

    Alex
    Felgo Team

    Hi Heini,

    i created 2 examples with which i just checked your issue, both work for me. Please try them too and let me know if there are also any issues.

    1. Move slider to change the opacity of the LineItem

    import VPlay 1.0
    import QtQuick 1.1
    GameWindow {
      id: window
      width: 960
      height: 640
      Scene {
        id: mainScene
        width: 480
        height: 320
    
        Column {
          anchors.right: parent.right
          width: 200
          Text {
            text: "opacity "+slider.value
            color: "white"
          }
          Slider {
            id: slider
            width: parent.width
            minimumValue: 0
            maximumValue: 1
            defaultValue: 1
            stepSize: 0.1
          }
        }
    
        LineItem {
          opacity: slider.value
          points: [
            {"x":100, "y":100},
            {"x":300, "y":300}
          ]
        }
      }
    }

     

    2. The LineItem fades in and out every second

    import VPlay 1.0
    import QtQuick 1.1
    
    GameWindow {
      id: window
      width: 960
      height: 640
      Scene {
        id: mainScene
        width: 480
        height: 320
    
        LineItem {
          id: lineItem
          points: [
            {"x":100, "y":100},
            {"x":300, "y":300}
          ]
          Behavior on opacity {
            NumberAnimation{duration: 500}
          }
        }
    
        Timer {
          interval: 1000
          running: true
          repeat: true
          onTriggered: {
            lineItem.opacity = lineItem.opacity === 0 ? 1 : 0
          }
        }
      }
    }

    Cheers,
    Alex

     

    #5942

    Heini

    Hi Alex,

    i tryed both examples, but none of them is working for me. The LineItems opacity does not change when moving the slider or when the timer triggerted.

    Thanks

    Heini

    #5956

    Heini

    Hi,

     

    updating to the latest Felgo version solved this problem.

     

    Cheers

    Heini

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded