Sign in to follow this  
toglia

Good use of the Qt's MVC pattern for 3d editors.

Recommended Posts

As many people, I want to do my first basic 3d game editor based on Qt. The editor word here is just huge cause what I want to do is very simple.

Anyway, I have been messing with Qt for a few months now, doing a 2d editor, and I'm almost getting addicted to it, although I know I'm certainly not using it at its best. One of the main things I didn't like, for example, was syncing the Qt model (QStandardItemModel) with Ogre's Scene Manager (the graphic's scene manager).

I used the QT model to store all the logic of the 2d scene itself. I would have an element/sprite per row with columns like name, position, dimension, showing/hiding, textures, etc, etc. This allowed me to use this model as a center for all the views; like, the elements view, texture view, etc. But most of the time I would catch an event, change the model then change the scene, which I always thought it was an error prone way of doing things, but it was the best I could do by that time.

I have discovered many cool things about Qt, but since a lot of users have used it before to create 3d editors too, I would like to know how did you guys end up implementing the model view controller pattern in graphic editors based on Qt, or how, for example, do you sync the graphic's engine world tree in a Qt Tree View.

Thanks!

[Edited by - toglia on October 1, 2010 8:35:36 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this