model-view Questions

3

Solved

I have a QList of custom structs and i'm using custom model class (subclass of QAbstractListModel) to display those structs in 1-dimensional QListView. I have overriden the methodsrowCount, flags a...
Breathless asked 29/6, 2019 at 16:23

2

The documentation https://developer.android.com/topic/libraries/architecture/viewmodel#sharing describes how we can share the same ViewModel across the different Fragments. I have some complicated...

1

Solved

I saw the same question in stack but they try to fix the error with the @ContributesAndroidInjector but in Dagger documentation says use @ContributesAndroidInjector is only optional, so here are my...
Tam asked 25/7, 2019 at 16:18

5

Solved

By default the cell in QTableView starts being edited after double click. How to change this behavior. I need it to start editing after one click. I have set combo-box delegate to the cell. When ...
Monofilament asked 16/9, 2013 at 15:2

2

Solved

I have an existing ComposePopupView() modelview which contains observable this.attachments = ko.observableArray([]); and a method below ComposePopupView.prototype.addDropboxAttachment = functio...
Heligoland asked 16/8, 2018 at 19:10

1

Solved

I have two modalviews - MyModalViewA (parent) and MyModalViewB (child). MyModalViewA spawns MyModalViewB, as custom binding, as well has observable array which I need to update. And it looks like:...
Gavage asked 20/8, 2018 at 13:9

3

Solved

I'm using a QListView with a custom model derived from QAbstractItemModel. I have on the order of millions of items. I have called listView->setUniformItemSizes(true) to prevent a bunch of layou...
Yonder asked 8/9, 2015 at 5:9

1

Solved

I'm implementing a Qt based tree view, where the view is a QTreeView-based class and the model is a QAbstractItemModel-based class. The tree is supposed to have millions of nodes in it. I'm impleme...
Schizogenesis asked 21/12, 2017 at 6:7

1

I'm trying to use the new Architecture Components, but I'm also still new to dagger and I'm missing stuff. With the below code, I'm getting a NullPointerException, can't locate where. Also if ther...

2

Solved

I am trying to implement a simple model for a treeview and I can't figure out why it isn't working.. It seems that all my nodes are children of my root node although three of them should be childre...
Outside asked 28/12, 2012 at 20:25

1

Solved

I want to implement in my program a tree with nested sub-levels, and I'm looking for which of those two kind(View/Widget) is best suited for my goal. I have a list of days with task that are eithe...
Detrain asked 8/1, 2015 at 4:13

2

Solved

To add new rows to model I am calling beginInsertRows and endInsertRows(). How to configure the view to scroll to new added rows and select it. I can do it by sending some signals but maybe Qt has ...
Desquamate asked 30/9, 2013 at 19:53

1

Solved

I have the QVector cars that I want to filter basing on the car's registration number. I want to create a new filtered vector. I don't think that this is ok because i'm iterating 2 vectors, copying...
Altitude asked 23/9, 2013 at 16:31

2

Solved

I am using Qt model/view framework. When I reset the data in the model, I have to reset the model to let views update also. How to do it? I found a signal modelReset(QPrivateSignal); in the QAbstra...
Katydid asked 7/2, 2013 at 16:58

2

I'm trying to highlight the currently selected item in a ListView. Below is the code I'm using; for some reason, while a similar code works perfectly in another ListView of this application, here t...
Magniloquent asked 2/7, 2012 at 19:5

1

Solved

I'm using QTableView with a subclass of QAbstractTableModel as its model. By implementing data() and headerdata() in the subclassed model, it is feasible to control many properties of the table lik...
Indihar asked 17/6, 2012 at 7:23

1

Solved

I am using a QSqlTableModel and QTableView to view an SQLite database table. I would like to have the table auto refresh every second or so (it's not going to be a very large table - a couple of h...
Expel asked 13/6, 2012 at 16:56

2

Solved

I have a strongly typed view of type ProductListingViewModel which in turn contains a ProductViewModel. (both custom view models). I have some form elements on my page and these are created like s...
Kippy asked 16/7, 2010 at 16:31
1

© 2022 - 2024 — McMap. All rights reserved.