Android 下面 跳转窗口为 透明



  • var component;
    var sprite;
    
    function createSpriteObjects() {
        component = Qt.createComponent("qml/CircleFriends.qml");
        if (component.status == Component.Ready)
            finishCreation();
        else
            component.statusChanged.connect(finishCreation);
    }
    
    function finishCreation() {
        if (component.status == Component.Ready) {
            sprite = component.createObject(mainWindow, {"x": 0, "y": 0});
            if (sprite == null) {
                // Error Handling
                console.log("Error creating object");
            }
        } else if (component.status == Component.Error) {
            // Error Handling
            console.log("Error loading component:", component.errorString());
        }
    }
    
    

    按照官方例子,我使用这段代码,然后android app 里面就点击按钮,发现是一个透明窗口,a 打开 b ,a现在是不能点击的状态,但是b 又是透明的。现在不知道怎么办了,难道用loader 吗?好多新窗口啊,不方便


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.