Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

ListModel in Python and QML

I have the below lists in python, I need to plot these lists as x,y,z co-ordinates in Scatter 3d series qml type USed AbstractTableModel to generate the cordinates using lists .py file: class ...
Jeyanth Inba's user avatar
0 votes
1 answer
47 views

Qml unexpected behaviour

In the following code a point can be removed from listmodel and in the next line it says ReferenceError : pthModel is not defined. Could you help me please? import QtQuick import QtQuick.Shapes 2.15 ...
Berkdan Kara's user avatar
0 votes
1 answer
176 views

Repeater Delegate not access the properties from list model

From this link described the Repeater problem. @Stephen Quan, As per your suggestion modified code to ListModel. ListModel { id:listModel } function handleModelChanged() { delegateModel....
Mohan S's user avatar
  • 11
0 votes
1 answer
230 views

Repeater model very slow when copying an item

We are facing a performance issue in our project. We are using Qt/QML and C++ backend and we are working on the Grid Buttons. If we are changing or updating the data model the repeater section takes ...
Mohan S's user avatar
  • 11
0 votes
2 answers
351 views

QML ComboBox model can't be filled using Javascript using append()

I'm using Qt 5.15.2 LTS for developing. Suppose I have following ComboBox: ComboBox { id: myComboBox ListModel { id: myModel } model: myModel delegate: ItemDelegate { ...
tai's user avatar
  • 528
2 votes
1 answer
398 views

QML, GridView delegate: ReferenceError: `<variable_name>` is not defined

I am struggling with it a bit so far, but couldn't find an answer. Here is the core situation. I have a GridView with ListModel: GridView { id: shapeSidePos ... model: shapeSidePosList ...
szymonkacperek's user avatar
0 votes
1 answer
145 views

How to create a GridView inside a Gridview(or list) by showing only selected in QML

I am trying to build a interface with QtQuick2 and i am having a trouble with a program list. I am trying to create a 10-element list and every element should have their own 20-element gridviews. And ...
utkuyceng's user avatar
0 votes
1 answer
372 views

How to change the content in specified GridView element with index number

i am building a project's front-end side with QtQuick2. I am having a trouble with popup styled elements. I created a ListElement first, then created a GridView and put ListElement elements into that ...
utkuyceng's user avatar
0 votes
1 answer
1k views

QML In ListModel, ListElement need to be visible conditionally

I am using Qt/QML. on my touch screen, I have a side drawer that enables when user touches the menu button and it brings a side panel to the screen. My ListView holds a list model which has 7 ...
J Patel's user avatar
  • 49
0 votes
2 answers
823 views

how to automatically update Listview in qml when ListModel changed

I have a problem that I use ListModel to save information that I read from database. But when the ListModel updated, the ListView did not update. my code as below: ListModel{ id: ...
Minh Nguyễn's user avatar
1 vote
0 answers
812 views

QML Dynamically Update ListModel

I'm confused at some point in QML as I'm new to it. The simplified QML codes define a window that includes one ListView which includes my delegate Items. One button loads and unloads this ListView ...
Enes's user avatar
  • 47
-1 votes
1 answer
582 views

TypeError: Cannot read property 'days' of undefined in qml

Below is a snippet of my code in which I get the error above.days is nested model: ApplicationWindow { id:appWindow width: 1000 height: 600 visible:true flags:Qt.FramelessWindowHint //color: "...
cgiannakidis's user avatar
1 vote
1 answer
1k views

how to implement nested listmodels in qml

Is it possible to implement 3 ListModels (one inside the other) and if yes how could I do it? The 3 ListModels are for hour day and month accordingly.In other words I want one model for hour inside ...
cgiannakidis's user avatar
0 votes
1 answer
172 views

typeerror: cannot read property 'newdaycalendar' of null in nested listview with listmodel dynamically created qml

This error occurs every time I run the below code in qmlscene .In the code there 3 nested ListViews which are populated dynamically with ListModels. The inside ListView is called daylistView , the ...
cgiannakidis's user avatar
0 votes
1 answer
2k views

ListModel in repeater

When using a ListModel for a repeater, if a property is not set in the first element of the model, then it is not considered in the following elements. Why? import QtQuick 2.7 import QtQuick.Controls ...
developer's user avatar
0 votes
1 answer
5k views

How do you iterate through all elements of a QML ListModel?

How can you iterate through all the individual ListElement(s) of a ListModel in QML?
DaveK's user avatar
  • 715
0 votes
0 answers
303 views

Error when trying to append listmodel with predefined variable

I am trying to append to a list using variables: property var varOne: "#asdflkj" It works if I type it out: listModel.append({"name":"#asdflkj"}) If I try to do it as I ...
Sam's user avatar
  • 93
0 votes
0 answers
136 views

Combine all Values from List Model into one string

I have the following: ListModel { id: myModel ListElement { name: "Number1" { ListElement { name: "Number2" { ListElement { name: "Number3" { } ...
Sam's user avatar
  • 93
0 votes
1 answer
224 views

QtQuick: Creating menu from ListModel

i am new to the forum and i started designing several things in QtQuick. I am still exploring and learning the basic stuff and i stumbled upon the following problem. When i try to create a menu (...
Seryoga's user avatar
0 votes
0 answers
222 views

How can I read listmodel role property in main.qml?

In main.qml, I am updating listModel dynamically on every function addItem() call. Herein, I am setting two role; buttonTypeRole and source. OneText.qml file has a Text field. Actually, after ...
RaviS Gupta's user avatar
0 votes
1 answer
108 views

How to get Jlist with JScrollpane list to show on a JFrame? isn't appear

I'm working on a school assignment with a GUI application dealing with a bookstorage system, the application should display a list of the book in bookstorage but when I launch it nothing shows. Below ...
SpaceSpaghetti's user avatar
0 votes
1 answer
351 views

How to assign QAbstractListModel to ListModel

I have an application which contains ListModel. I have written C++ class derived from QAbstractListModel. QML List model looks like // SelectedStepsModel.qml import QtQuick 2.0 ListModel { ...
PMJ's user avatar
  • 21
2 votes
1 answer
1k views

Adding data to QML TreeView

I'm developing an application. I need to add data to TreeView but I have some problems with TreeView's nested model. I created a List Model which is ListModel { id: fruitModel ListElement { ...
Hilal Köktürk's user avatar
1 vote
2 answers
669 views

QML | Persistent Memory in ListModel (storing ListModel for later use)

Given a ListModel with multiple layers of stored information (arrays of elements stored within elements), is there a way to store the model and recall it later? I've tried storing ListModel as a JSON ...
Tyler M's user avatar
  • 412
1 vote
1 answer
113 views

Qt QML Why isn't this ListView and ListModel consitent?

I'm having a problem with a ListView and a simple ListModel; import QtQuick 2.12 import QtQuick.Controls 2.12 ApplicationWindow { id: app visible: true width: 640 height: 480 ...
jkj yuio's user avatar
  • 2,603
1 vote
0 answers
20 views

jlist listModel arrayOutOfBounds at 20 items [duplicate]

I have a DefautListModel which reads file names from a directory. Whenever I have more than 19 files I get: java.lang.ArrayIndexOutOfBoundsException: Index 20 out of bounds for length 20 I tried ...
rasweeny's user avatar
0 votes
0 answers
845 views

Get specific item in model QML

I can recover an element in my model: property var model: [ { title: i18n.tr("Standard"), descr: i18n.tr("Style by default"), style:"default" }, { title: i18n.tr("None"), descr: i18n.tr("Icons ...
Jimmy L's user avatar
1 vote
1 answer
627 views

Implementing ListModel with Gee.ArrayList

So I thought I'd be clever one of the more generic and easy to use classes, namely Gee.ArrayList for the data for a ListBox. Turns out that ListBox will take a ListModel, and I figured, since I was ...
rasmus91's user avatar
  • 3,184
1 vote
1 answer
1k views

Multiselect QML ComboBox

I am building my first application and I want to have a combobox with certain options in it; when 1 of these options are selected, I want another combobox to be populated with certain options. ...
Wabwire Levis's user avatar
0 votes
1 answer
2k views

Trying to remove a Element from a DefaultListModel object

using java version 9 I have some test code to remove a item from a list created by passing a refrence to by DefaultListModel. This is what I do. create a DefaultListModel object add 8 elements to it ...
Ted pottel's user avatar
  • 6,983
2 votes
0 answers
2k views

QML ListModel to string

I have a ListModel filled like that: Component.onCompleted:{ fillListModel(); } ListModel{ id:listModel; } function fillListModel(){ for(var i=0; i<2; i++) listModel.append({"aKey": "...
SteveTJS's user avatar
  • 685
0 votes
0 answers
971 views

How i can save into JSON file a QML list model? [duplicate]

Hello everyone i want to know if is possible save into JSON file the list element of a qml list model and if it is possible how i can do it? This is a simple code where there are a list view with ...
pablodepas87's user avatar
0 votes
2 answers
674 views

Shuffle QML ListModel

I have a ListModel and a repeater. The repeater draws the Items from the ListModel, one on top of a another. That works fine so far. Except that for on each application start I want to have a ...
user2567875's user avatar
0 votes
1 answer
2k views

Creating a complex List Model in QML

I am using a ListView to display data. For that I use Component as a delegate and ListModel as the model to create rows in the ListView: Below image is the use case for the design: I use a function ...
pra7's user avatar
  • 884
0 votes
0 answers
666 views

unchecked call to setModel(ListModel<E>) [duplicate]

In my application, in which I have two JLists, I'm trying to show the contents of the second one depending on what is selected in the first one. Let's say I have group 1, group 2 and group 3 at List1, ...
Hector Guerra's user avatar
0 votes
0 answers
153 views

implements ListModel, need to update JList on Change

I have a custom collection which implements ListModel. When this collection changes, i need to notify the JList. Typically you'd fireListDataChanged, but this is not a method implemented by ListModel. ...
CoupFlu's user avatar
  • 321
0 votes
2 answers
183 views

How to transfer one ListModel into an other one in Java

I have two ListModels: listModelRight und listModelLeft. I just want, that listModelRight = ListModelLeft, but even this dont work. How can i do it? Code Example: listModelFilterleft = ...
J. K. Wilke's user avatar
0 votes
1 answer
969 views

How to Bind a Readonly var to the Data Of a ListModel in QML?

Brief Is it possible to create a readonly property var bound to the data inside the ListElement values of a ListModel? (Or is there some equivalent route to get a structured readonly object ...
Jason R. Mick's user avatar
0 votes
0 answers
385 views

Update backend data from QML ListModel

I have a couple different lists of objects returned from an API that I use to define the items in a ListView. How do I persist any changes made from user interactions? How do I save which color is ...
JymmyZ's user avatar
  • 126
-2 votes
1 answer
277 views

QML ListModel.onRowsAboutToBeRemoved arguments [closed]

I'd like to know the arguments for the automatically-generated QML function onRowsAboutToBeRemoved (of the ListModel component.) Specifically, I need to know what the index value is called so I can do ...
user1765354's user avatar
0 votes
1 answer
591 views

Chage ListModel data in qml file using C++

There is an example : http://doc.qt.io/qt-5/qtdatavisualization-qmlscatter-example.html of using qml and QtQuick to create a 3D scatter. How can I chage (delete, append, clear) ListModel data in ...
NonSense's user avatar
  • 173
1 vote
1 answer
1k views

qml append json stream to listmodel

I would like to append an answer in JSON from a web server to a QML ListModel. Currently I am using eventModel.append(jsonObject) which works fine if the answer only contains strings or numbers but ...
Sikarjan's user avatar
-1 votes
2 answers
1k views

Collection of ListModel in QML

How can I create a Collection of ListModel Each list ListModel conatains 5 ListElement ListModel{ ListElement { type:"1" title:"5:03pm" description:"text-1" ...
Vineesh TP's user avatar
  • 7,943
2 votes
2 answers
3k views

How to pass objects between qml

I want to pass an objects from one qml to other qml. I have a list model. ListModel { id:favouriteapp ListElement { id: 1 name:"ABSC" ...
Vineesh TP's user avatar
  • 7,943
0 votes
1 answer
2k views

How to check Object existence in ListModel

I want to add object dynamically to the ListModel. But I need to append the object only if it does not exist in the model. I gone through the Documentation I couldn't find any methods for this. Is ...
Vineesh TP's user avatar
  • 7,943
1 vote
2 answers
3k views

Drag and drop multiple items in Qml

I need to draw bunch of Rectangles in my application. The user should be able to select each of them individually and move them freely and change their position. The user also should be able to select ...
Ehsan Enayati's user avatar
-1 votes
4 answers
365 views

ArrayList to JList - More than one object element

I'm using Eclipse, programming in Java. The problem: This is how I want my JList to be displayed: 1 - Dante 2 - William 3 - Jaime etc... Now, the numbers are the IDs of the objects, and the names ...
HWerneck's user avatar
2 votes
1 answer
2k views

How exactly do I use the "fireContentsChanged" method in java.swing.AbstractListModel?

How exactly do I use the fireContentsChanged() method in java.swing.AbstractListModel? This method is called when some of the ListModel's elements have their "contents" changed. Does this only mean ...
David Joseph's user avatar
0 votes
1 answer
237 views

Save/Read Custom Arraylist in Sharedpreferences [duplicate]

I'm working on a app where you can save and read homeworks, for the "undone" progress I want to save the Arraylist, where I saved all homeworks, in the Shared Preferences. I hope you know what I mean, ...
rib's user avatar
  • 200
0 votes
1 answer
4k views

QML ListModel append broken for object containing an array?

ListModel produces unexpected and pretty much broken results when trying to insert a JS object which contains an array: property ListModel model : ListModel {} Component.onCompleted: { var a = [1, ...
dtech's user avatar
  • 49.2k