model-view

QT: I've inherited from QTreeView. I've inherited from QStandardItem. How do i Style the items?

My Google skills must be failing me today. I've inherited from QTreeView to create a TreeView that stores a QStandardItemModel instead of a QAbstractItemModel. I have also inherited from QStandardItem to create a class to store my data in an item as is necessary. I've successfully inserted my derived QStandardItem into my derived QTree...

How set opacity on QGraphicsItem

Hello, i have a inherited from QGraphicsScene and QGraphicsItem to create my own classes. I use Qt 4.6. I want to set a specific opacity on each items of my scene. I use setOpacity : setOpacity method, but its not the result i hope. I want to have for example one item opaque and an other transparent (to see the desktop, or the other ap...

Propagate changes in model to view in Silverlight

Hi folks, in my Silverlight 4 Application I have an ObservableCollection that I data bind to two different listboxes. The listboxitems showing the content of the MyClass-Object. When I add an item to the ObservableCollection, the new item is displayed in both listboxes properly. I have set the Binding Mode to two way, so that editing t...

Model binding for a ViewModel containing multiple objects

Hey everyone, 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 so: <%: Html.DropDownListFor(m => m.ProductViewModel.CategoryId, Model.Categories)%> which generates the HTML: <select name...

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 a minute, then 0 minutes and the corresponding number of seconds must be displayed [0:42...

Qt: Accessing cells in a QTableView

I have a QTableView which is pulling a list of locations and latitude/longitude coordinates from an SQLite database. I want to extract the latitude and longitude from the row that the user has selected in the table, and am using the following code, but it looks fairly convoluted. Maybe I'm just not understanding how to fully utilize Qt's...

Jquery simple model view problem

I am trying to make little photo gallery with help of model view. But when I click on photo model views opens and shows photo but also it deletes it from photo gallery.I used append to create on model viev user information. <div class="userList"> <div class="user" href="#?w=500" rel="popup_name"> <img src="style/images/category/1.jpg" ...

QAbstractItemModel for QMetaObject, do I have to write it myself?

A suite of data models built on top of Qt's reflection system seems like a natural synergy, but I haven't found such a beast in the Qt library itself or from a 3rd party. Does anyone know if such a thing exists? I'm look for data models for editing and displaying a collection of QObjects QMetaObject properties. I can kind of understand ...