Questions tagged [model-view]

model-view describes the relationship between the model and the view when using model-view-controller

Model-view-controller is an architecture to separate the model (data) and the view (interface). The model contains the information for a program while the view is the interface with the user. The controller is used to update the model from user input and to update the view when the model changes.

259 questions
2
votes
1 answer

Widgets as data in QTableView

I'm trying to make a table-based interface as follows: | QComboBox | QPushButton | Empty | | Some data | Some data | QPushButton | | Some data | Some data | Empty | (all additional rows resemble this one) In the first row, I want a…
2mac
  • 1,609
  • 5
  • 20
  • 35
2
votes
2 answers

how to sort durations with Qt?

i'm trying to make QSortFilterProxyModel sort items by duration. preconditions: hours and minutes must not have leading zeros if duration is less than an hour, then hours must not be displayed, but only minutes and seconds if duration is less than…
theorist
  • 169
  • 1
  • 10
2
votes
0 answers

PySide QListView: Can't replace default editor via QStyledItemDelegate

I'm going through a -probably too brief- tutorial about Qt's model-view-concept. The following code is supposed to replace the default QLineEdit with a QSpinBox via a delegate class. What is wrong so that still the default QLineEdit shows up? from…
barrios
  • 1,104
  • 1
  • 12
  • 21
2
votes
1 answer

Loading data in QTreeView async

I have a really big tree structure and I cant load the complete tree into Ram on client side. I am using Qt's QTreeView. I want to load the sub elements of an item dynamically when the user expands the element. Is there some signal that triggers…
feedc0de
  • 3,646
  • 8
  • 30
  • 55
2
votes
1 answer

How to create object of one Model after creating another Model's object using serialization and modelViewSet

These are MODELS: class Event (models.Model): status = models.CharField(max_length = 30, blank = True) time = models.DateTimeField() point = models.ForeignKey(Point) person = models.ForeignKey(Person) device =…
2
votes
1 answer

Getting the ListView index of a QList object

I've exposed a QList as a model for a ListView. But how can I get the ListView index of a MyItem* object? Context: I'm making a findObject() function in C++ and when I've found the object (a MyItem*), I want to scroll to the corresponding…
jco
  • 1,335
  • 3
  • 17
  • 29
2
votes
1 answer

openGL/glut & glm ModelView Matrix

I've been trying to use modelview matrix for one of my projects but for now I get a bit unexpected results, which blocks my further progress. GameEntity::GameEntity{ view_matrix = glm::lookAt(glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f, 0.f, 1.f),…
Kwydin
  • 57
  • 5
2
votes
1 answer

MVC 4 textbox not updating on postback

I have a form that uses a modelview object that is not updating a textbox value on postback of submitting a form. On submitting a form, I edit the property of an object that is binded to a textbox. When the form comes back, the object property is…
Jakal
  • 62
  • 2
  • 13
2
votes
2 answers

Android RoboBinding firePropertyChange() undefined error

I am currently working on Android data binding application. I am using android "RoboBinding" library for binding Model-View and View-Model. I have used sample application from here for reference. This is my PresentationModel.java class…
Siddharth_Vyas
  • 9,972
  • 10
  • 39
  • 69
2
votes
2 answers

Datagrid binding several properties of one object to column

I have an object with several properties. However some of these properties contain information of the same group so to say. I would like to show these properties in a table in a way that in the same column i could put the properties of the same…
xnonamex
  • 405
  • 2
  • 5
  • 17
2
votes
0 answers

Map Dictionary as Model to QTableView

I have a file transfer app that I've been writing and part of it involves a PySide GUI that'll show progress of file transfers. I have dictionary data being passed around while the transferring goes and I'm struggling with which variety of…
Cryptite
  • 1,426
  • 2
  • 28
  • 50
2
votes
1 answer

How to pass data from Razor View Kendo UI DropDownList to Controller Variable?

vs'12 , KendoUI, asp.net C# MVC4 Internet Application EF Code First Would like to see how one would pass values form a KendoUI DropDownList to a MVC Controller from a Razor View Controller [HttpPost] //[AcceptVerbs(HttpVerbs.Post)] public…
2
votes
3 answers

view not gathering data from service through controller

Having trouble loading an external json file and having it's contents display on my view. I've included my view, controller and services code. What do I need to change? view.html
captainrad
  • 3,760
  • 16
  • 41
  • 74
2
votes
1 answer

View isn't updated after changing model

I'm trying to implement a model/view architecture in my program but the view isn't updated after changing the model, though I think it automatically should be. Here's a simplified version of my code: QStringListModel *model = new…
user2429940
2
votes
2 answers

Interpolate between two modelview matrices

In OpenGL, given two camera positions (i.e. model view matrices), I would like to smoothly transition between them. That is, I want to interpolate between the two modelview matrices. I've seen many resources that talk about using SLERP to…
t2k32316
  • 993
  • 1
  • 13
  • 29