Hi all,
I am trying to create an application which displays a scene graph from an OpenSceneGraph file. For now, it works. I started with an already existing project, and have created my own branch to make some tests. The whole code is available on github: QosgSceneEdit.
Now, what I want is to set for each item in the QTreeView a custom editor to change the properties of the associated OSG node. For instance, if my node is a PagedLOD, I would like to be able to change its ranges, taht is to say, the editor has to provide some QLineEdit with QDoubleValidator. I tried, but I cannot manage to find a way to do this. From what I have read, it seems that I have to use a custom class derived from QStyledItemDelegate. However, I cannot figure what should I reimplement in the derived class, and, moreover, how can I attach a dedicated QStyledItemDelegate based on the node type contained in the item (PagedLODDelegate for items containing an osg::PagedLOD, and so on).
Any help would be appreciated. And, if you could provide some code, or a detailled step by step solution, it would be perfect!
Regards,
Olivier
Bookmarks