Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QML
Forum Update on Monday, May 27th 2025

QML

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 355 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 1 Offline
    1 Offline
    123456789
    wrote on last edited by
    #1

    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";
       }
    
    
            }
    

    }

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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,.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved