Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Problem on Shown a masked Qml Object on Huawei device



  • Hi .
    I have a picture that masked by circle (made bye Rectangle ).
    Its work correctly on most devices but not work correctly on a Huawei device .
    where is the problem
    please help me .
    tanks !
    alt text


  • Lifetime Qt Champion

    Hi,

    You should show the code you use for that as well as provide the version of Android you use on your device.

    On a side note, I don't know whether the people on your picture are fake data or not but if they are not, you are providing their phone number to anybody reading this topic.



  • the persons and their number are fake.
    my android version is 4.4
    it's my code:

    Rectangle {
    id: mycanvas
    width: height
    height: parent.height0.9
    radius: height
    clip: true
    x:parent.width
    .030
    y:(parent.height-height )*0.5

        Image {
            visible: false
            id: picture
            height: parent.height
            width: height
            z:-2
    
            Rectangle{
                //halat difualt
                z:-1
                color: "#dbd8d8"
                anchors.fill: parent
                Text {
                    text: "o"
                    font.family: icons.name
                    anchors.horizontalCenter: parent.horizontalCenter
                    anchors.verticalCenter: parent.verticalCenter
                    font.pixelSize: ratio*17
                    color: "white"
                }
            }
        }
    
        OpacityMask{
            anchors.fill: picture
             source: picture
             maskSource: mycanvas
    
        }
    

    }


Log in to reply