История изменений
Исправление fluorite, (текущая версия) :
Вообще id здесь не использовал ))
main.qml
import QtQuick 2.6
import QtQuick.Window 2.2
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
PropertiesMenu { anchors.fill: parent; anchors.margins: 20 }
}
PropertiesMenu.qml
import QtQuick 2.6
PropertiesMenuView {
textRole: "name"
model: ListModel {
ListElement { name: "eng" }
ListElement { name: "ru" }
}
}
PropertiesMenuView.ui.qml
import QtQuick 2.6
import QtQuick.Controls 1.5
ComboBox {
anchors.left: parent.left
anchors.right: parent.right
}
Исправление fluorite, :
main.qml
import QtQuick 2.6
import QtQuick.Window 2.2
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
PropertiesMenu { anchors.fill: parent; anchors.margins: 20 }
}
PropertiesMenu.qml
import QtQuick 2.6
PropertiesMenuView {
textRole: "name"
model: ListModel {
ListElement { name: "eng" }
ListElement { name: "ru" }
}
}
PropertiesMenuView.ui.qml
import QtQuick 2.6
import QtQuick.Controls 1.5
ComboBox {
anchors.left: parent.left
anchors.right: parent.right
}
Исходная версия fluorite, :
main.qml
import QtQuick 2.6
import QtQuick.Window 2.2
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
PropertiesMenu { anchors.fill: parent; anchors.margins: 20 }
}
PropertiesMenu.qml
import QtQuick 2.6
PropertiesMenuView {
textRole: "name"
model: ListModel {
id: listModel
ListElement { name: "eng" }
ListElement { name: "ru" }
}
}
PropertiesMenuView.ui.qml
import QtQuick 2.6
import QtQuick.Controls 1.5
ComboBox {
anchors.left: parent.left
anchors.right: parent.right
}