On 17.05.07 15:35:00, Detlev Offenbach wrote: > Hi Phil, > > I'd like to integrate Qt-Designer into eric4 for version 4.1. In order to do > that I would need the class 'QDesignerComponents' to be wrapped, although it > is not documented in the Qt help pages. Do you think, that could be done?
I guess just wrapping QDesignerComponents is not enough, at least in C++ you need the shared_global_p.h from lib/shared (in designer src) and qdesigner_integration_p.h from the same dir. Then the setup is done like this: QDesignerComponents::initializeResources(); m_designer = QDesignerComponents::createFormEditor(this); m_designer->setWidgetBox(QDesignerComponents::createWidgetBox(m_designer, 0)); m_designer->setPropertyEditor(QDesignerComponents::createPropertyEditor(m_designer, 0)); m_designer->setActionEditor(QDesignerComponents::createActionEditor(m_designer, 0)); m_designer->setObjectInspector(QDesignerComponents::createObjectInspector(m_designer, 0)); new qdesigner_internal::QDesignerIntegration(m_designer, this); Then all one needs to do is create a formwindow, set its contents and filename, create a QMdiArea and add the formwindow as subwindow. If you need more ideas see svn://anonsvn.kde.org/home/kde/trunk/KDE/kdevelop/plugin/qtdesigner/ Although that one is a bit more complicated because it provides the designer toolviews outside the qmdi area and allows to have multiple qmdiareas for the same .ui file (i.e. multiple views onto the same file). Andreas PS: The setup-stuff was originally written by Roberto Raggi, the author of the Qt4 designer. Especially the new qdesigner_internal-line is important. -- Your life would be very empty if you had nothing to regret. _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
