Qt Designer
From qtnode
Contents |
Introduction
To be written.
Common Issues
How to use the UI files
There is a good tutorial on how to use components in your applications at: http://doc.trolltech.com/latest/designer-using-a-ui-file.html
We've compiled some simple working examples on how you can do this. Download Media:Designer-using-a-component.zip to test it out.
Why my plugin does not work
This is deeply commented in this article and some other notes are available at this page. But in summary:
- A symbol may be missing. Link your dll with a file containing an empty main function and the error will pop up.
- The library cannot be located. The plugin must be located in a subfolder named 'designer' inside one the following paths:
- $QTDIR/plugins
- The path where the binary of the plugin host is
- Any path on the QT_PLUGIN_PATH (PATH environment var syntax as it is in your system)
- Any explicitly added path using QCoreApplication::addLibraryPath or QUiLoader::addPluginPath
- Another version of the library is placed on a different valid place or with a different name. Remove the library and if you still see the symbols, that's your case.
- Your are compiling in either debug/release version of the library and designer or the host is compiled using the other version. Use ldd in Linux to check what's happening.
- The initXml() function returns invalid XML. In this case you can load an interface with such plugin but it won't be on the widget toolbox
- Missing Q_OBJECT in your widget class. The widget will work properly but will be saved on the ui file as a superclass object missing any specific properties.
Qt Designer Tips and Tricks
A collection of Qt Designer tips and tricks that may be of some use: Qt Designer Tricks