QML



  • is giving a strange error
    http://prntscr.com/k01h5y

    import QtQuick 2.1
    import QtQuick . Layouts 1.0
    import QtQuick.Controls 1.0
    import QtQuick.Layouts 1.0
    import QtQuick.Dialogs 1.1

    //QString nvl= ui->TextField->text();
    ColumnLayout {
    anchors.fill: parent
    anchors.margins: 300
    spacing: 3
    property color mainAppcolor: "#6fda9c"

    Label{
        text: "LOGIN"
        font.pointSize:70
        leftPadding: 90
        width: layout.implicitWidth
    }
    
    ComboBox {
        Layout.fillWidth: true
        model :[ "Nível 1                                      " ,
                 "Nível 2                                      " ,
                 "Nível 3                                      " ,
                 "Nível 4                                      "  ]
    }
    
    TextField {
            id: password_field
            placeholderText: qsTr("Write your password")
            Layout.fillWidth: true
            echoMode: TextInput.Password
        }
    
    Button {
    

    // property var String: 0

       // id: proccessButton0
       Layout.fillWidth: true
    
    
    
    
       onClicked: {
           if(TextField.text=="123"){
           Label.text== "já foste";
           }else
             Label.text== "já foste";
       }
    
    
            }
    

    }


  • Qt Champions 2017

    Hi
    You reference a undefined layout and you might have multiple anchors.
    but it gives file and line number so should be easy to fix in the real code,.


Log in to reply
 

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