Layout is not defined
-
I am creating login in qml but exist errors
Can someone help me?
qrc:/PageLevels.qml:24: ReferenceError: layout is not defined
qrc:/PageLevels.qml:8:1: QML QQuickItem: StackView has detected conflicting anchors. Transitions may not execute properly.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();
Item{
id: idItemLogin
width: parent.width / 2
anchors.centerIn: parent
anchors.verticalCenterOffset: -parent.height / 4ColumnLayout { id: idLoginColumn anchors.fill: parent anchors.margins: 3 spacing: 3 Label{ text: "LOGIN" font.pointSize:70 leftPadding: 90 width: layout.implicitWidth } ComboBox { id: idNivel Layout.fillWidth: true model :[ "Nível 1 " , "Nível 2 " , "Nível 3 " , "Nível 4 " ] } TextField { id: idPasswordTextField placeholderText: qsTr("Write your password") Layout.fillWidth: true echoMode: TextInput.Password } Button { id: idbtnSubmit Layout.fillWidth: true onClicked: { console.log("ProcessButton: id = ", idNivel.text) console.log("ProcessButton: Password = ", idPasswordTextField.text) if(TextField.text=="123"){ Label.text== "já "; }else Label.text== "já foste"; } } }
}
-
I am creating login in qml but exist errors
Can someone help me?
qrc:/PageLevels.qml:24: ReferenceError: layout is not defined
qrc:/PageLevels.qml:8:1: QML QQuickItem: StackView has detected conflicting anchors. Transitions may not execute properly.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();
Item{
id: idItemLogin
width: parent.width / 2
anchors.centerIn: parent
anchors.verticalCenterOffset: -parent.height / 4ColumnLayout { id: idLoginColumn anchors.fill: parent anchors.margins: 3 spacing: 3 Label{ text: "LOGIN" font.pointSize:70 leftPadding: 90 width: layout.implicitWidth } ComboBox { id: idNivel Layout.fillWidth: true model :[ "Nível 1 " , "Nível 2 " , "Nível 3 " , "Nível 4 " ] } TextField { id: idPasswordTextField placeholderText: qsTr("Write your password") Layout.fillWidth: true echoMode: TextInput.Password } Button { id: idbtnSubmit Layout.fillWidth: true onClicked: { console.log("ProcessButton: id = ", idNivel.text) console.log("ProcessButton: Password = ", idPasswordTextField.text) if(TextField.text=="123"){ Label.text== "já "; }else Label.text== "já foste"; } } }
}
@MIcas_213 said in Layout is not defined:
width: layout.implicitWidth
It should be
Layout
, with a capital 'L'.