Project

General

Profile

Actions

Bug #1710

open

askRender crashing

Added by navnidhi sharma almost 12 years ago. Updated almost 12 years ago.

Status:
Feedback
Priority:
Low
Assignee:
-
Target version:
-
Start date:
02/18/2013
Due date:
% Done:

0%

Estimated time:

Description

I have a TreeView and TableView and the model is set to filterModel*(WSortFilterProxyModel) and filterModelTree*(WSortFilterProxyModel), respectively and those are set to WStandardItemModels.

I insert items to WStandardItemModel in a server thread and an inserted items shows up in the table view unless I select the node for which a row is being inserted. In such case, it crashes as given in the attached file at askRender. Will WReadOnlyProxyModel help here? If yes, what should be the model source settings?

Thanks


Files

Untitled.png (107 KB) Untitled.png navnidhi sharma, 02/18/2013 10:24 PM
Actions #1

Updated by Koen Deforche almost 12 years ago

  • Status changed from New to Feedback

Hey,

Yes, you cannot share a model currently between multiple sessions. WReadOnlyProxyModel would help only if you do not intend to change the model (i.e. if it is static), but this is not what you are trying to do ?

Regards,

koen

Actions #2

Updated by navnidhi sharma almost 12 years ago

Koen,

Thanks for the response. I get the data from a socket and insert it continuously into the WStandardItemModel that is read only for the clients. The clients can only sort and select the data they want to see. I have defined WStandardItemModel in a singleton.

In the test, I did not use multiple clients yet. It crashes in a single client/browser test. I would like to try with the WReadOnlyProxyModel, but could you tell me the usage? Let's say, I have model(WStandardItemModel), filter(WSortFilterProxyModel), and readonly(WReadOnlyProxyModel) models. The model is being updated from the socket data and I call filter~~setSourceModel(model), filter>setDynamicSortFilter(true), filtersetFilterKeyColumn(kSortKey), and filter~~>setFilterRole(Wt::UserRole). Except first, the last functions are only defined for filter model. How will I use readonly model?

Thanks

Actions #3

Updated by Koen Deforche almost 12 years ago

Hey,

You can't use readonly model for a model which gets updated --- it only supports the function of a 'static' model without data changes.

Regards,

koen

Actions

Also available in: Atom PDF