[Qt-interest] QDesignerCustomWidgetInterface and ui files

Nick Davidson Nick at toby-churchill.com
Tue May 31 12:39:21 CEST 2011


Dear List,

We are using Qt 4.6.3 on Debian Squeeze and currently investigating
using custom widgets compiled in to libraries and exposed to Designer
via the plugin interface.

The domXml documentation
(http://doc.qt.nokia.com/4.6/designer-creating-custom-widgets.html#notes
-on-the-function) is unclear on what it is actually necessary to return
in order to get a plugin to display properly in Designer / Creator and
if you can lay out a custom widget and it's children in a Form file
(*.ui) or not.


I have a working plugin but in order to make it display correctly I had
to move the contents of the customwidget.ui file in to the domXml()
function and return it as one massive string.

If I try and just specify the geometry we loose all the custom styling
and constraints we've applied and if I follow the examples and add the
<customwidgets> <customwidget> hirarchy we don't get anything displayed
at all.

Is there a way of specifying the ui file to include in the <ui> tag or
does the whole thing have to be designated either in C++ like the
analogue clock example or as a string in domXML? I feel like we've got
something wrong in our pro files.

An example project tree is available at
https://gitorious.org/qtcustomwidget/qtcustomwidget/trees/master
And the domXML we are currently exporting at:
https://gitorious.org/qtcustomwidget/qtcustomwidget/blobs/master/plugin/
predictorwidgetplugin.cpp#line62


Regards,

Nick Davidson

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the Qt-interest-old mailing list