RowLayout is not a type
-
This issue is similar with the one that I have asked before, but in fact, it is not completely same.
I have made one simple code using QML (5.14.2), when I compile the code ,it give error : "qrc:/main.qml:28:17: RowLayout is not a type"I really not know what the really reason for this one because I have already import the "QtQuick.Controls 1.4" .
I guess it may case the mix using control 1 and control 2 together. Hope to get get some help for :
- how to fix this issue and what is the reason for this error ?
- is there some of specification or conduct for using version of qml control ? (something like that)
The code I am using is :
import QtQuick 2.12
import QtQuick.Controls 1.4
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Scroll")Item { id: inforWindow anchors.fill: parent TableView { id: inforWindowView anchors.fill: parent.anchors.fill Tab { id: inforWindowViewTab title : "123-case" Text { id: inforWindowViewTabText text: qsTr("text") } RowLayout { //here is the error reported. spacing: 6 anchors.fill: parent Button { id: caseInforEnterBtn anchors.bottom: parent.bottom anchors.right: parent.right width: 50 text: qsTr("Enter") } ComboBox { anchors.left: parent.left anchors.right: caseInforEnterBtn.left anchors.verticalCenter: caseInforEnterBtn.verticalCenter } } } Tab { title: qsTr("general") } } }
}
-
This issue is similar with the one that I have asked before, but in fact, it is not completely same.
I have made one simple code using QML (5.14.2), when I compile the code ,it give error : "qrc:/main.qml:28:17: RowLayout is not a type"I really not know what the really reason for this one because I have already import the "QtQuick.Controls 1.4" .
I guess it may case the mix using control 1 and control 2 together. Hope to get get some help for :
- how to fix this issue and what is the reason for this error ?
- is there some of specification or conduct for using version of qml control ? (something like that)
The code I am using is :
import QtQuick 2.12
import QtQuick.Controls 1.4
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Scroll")Item { id: inforWindow anchors.fill: parent TableView { id: inforWindowView anchors.fill: parent.anchors.fill Tab { id: inforWindowViewTab title : "123-case" Text { id: inforWindowViewTabText text: qsTr("text") } RowLayout { //here is the error reported. spacing: 6 anchors.fill: parent Button { id: caseInforEnterBtn anchors.bottom: parent.bottom anchors.right: parent.right width: 50 text: qsTr("Enter") } ComboBox { anchors.left: parent.left anchors.right: caseInforEnterBtn.left anchors.verticalCenter: caseInforEnterBtn.verticalCenter } } } Tab { title: qsTr("general") } } }
}
-
@white The documentation is very clear:
This post is deleted!