Qml list disappeare and not visible sometimes
Unsolved
QML and Qt Quick
-
I have this code here to implement simple Qml List as an example from QMl reference.
The list doesn't appear at all.
b394413d-2ed5-4728-b0f5-2dc59716c521-image.png
This's the code
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") ListModel { ListElement { name: "Bill Smith" number: "555 3264" } ListElement { name: "John Brown" number: "555 8426" } ListElement { name: "Sam Wise" number: "555 0473" } } }
The list I want to do is this one. but the begining not even working.
-
You're not setting a ListView to display the ListModel, see here for answer;