PDA

View Full Version : Any way to integrate Qt Designer with a modeling tool ide I'm creating?



mclagett
16th October 2011, 18:38
Hi --

I'm putting together a modeling tool platform and would like to use Qt and OpenGl for all my graphics. I'm wondering if there might be a facility for integrating the Qt Designer into my IDE, along the lines of what is being done in the QT CREATOR? Has anyone done this?

Any help would be greatly appreciated.

regards,

Mike

wysota
16th October 2011, 21:04
What exactly from Qt Designer do you want to take?

mclagett
16th October 2011, 23:12
I was thinking it would be nice to be able to expose the toolbox, the designer surface and the logic behind it that generates a Qt form. Actually ideally I probably would want to integrate the toolbox icons into my own toolbox mechanism, but it would be nice if there were the designer surface and the drop functionality that would allow me to drop the QT widget icons onto the surface and have the same code generation happen that currently happens in the Designer.

Don't know if it was designed this way, but I was hoping that because the QT Creatior has form design capability in it, that there might have been some reuse of the components within the Qt Designer and that they might be engineered to support this sort of thing.

wysota
17th October 2011, 09:59
But do you want to design Qt forms or just any form (or some specific kind of form)? Because if the latter then Designer is not of much use to you, it is tailored for Qt forms only.

mclagett
17th October 2011, 14:46
No, I have decided to use Qt for my cross-platform GUI needs. I am building my application on top of my own custom VM and a custom language built on top of this. I am in the process of adding Qt bindings to my language in much the same way that the Ruby folks have done, exposing the basic QT API through my platform's Foreign Function Interface. So I will be using Qt for my own platform's IDE GUI, but also as a way to include GUI elements in the models and domain-specific languages that are created using my tool.

In this context, I would like to have the Qt Designer functionality as a quick way create forms -- whether it is me creating them for my IDE or my users creating them for GUI elements integrated into the models and DSLs they create.

Ultimately, I will probably build my own designer functionality, so that Qt GUI generation can be integrated more closely with other visual element generation (like the visual graphs that will be part of some languages created with my tool, which I'm intending to implement with OpenGL). Ultimately, I would want the designer surface to accomodate mixtures of Qt widgets and other more custom (OpenGL-implemented) smart shapes, and I'm assuming this would exceed the capability of the existing QT Designer components. But in the interim it would be nice not to be completely without a UI design surface in my tool until I get to the point in the development plan where my more full-function GUI design surface will be completed (several other things have higher prioirty and need to be completed first).

wysota
17th October 2011, 14:54
The simplest way would be to teach your VM to read Designer UI files and then to simply let your users use Designer (probably accompanied with some custom widget plugins) as a separate executable to build their UIs.

mclagett
17th October 2011, 16:43
Thanks very much for your repsonses. I suspected this would be the ultimate answer, as this is indeed what is done for the Visual Studio Add-In. I'm thinking maybe I'll make Qt Widgets the first implementation of my own toolbox/drag-drop/designer-surface functionality and go ahead and code that up just to the point of being able to generate Qt code. I'm going to the need the functionality anyway, as I mentioned earlier, so I might as well push a minimal implementation of my general engine up in the development schedule just to have an integrated facility.

Once again, thanks very much for your help.

wysota
17th October 2011, 16:45
It's not that you can't cut the code out of Designer and integrate it with yours. It is just that it is really lots of work that might not be worth the trouble.