Qt World Summit: Submit your Presentation

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


    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
    y:(parent.height-height )*0.5

        Image {
            visible: false
            id: picture
            height: parent.height
            width: height
                //halat difualt
                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"
            anchors.fill: picture
             source: picture
             maskSource: mycanvas


Log in to reply