Adding Qt Designer PluginsYou can use Qt APIs to create plugins that extend Qt applications. This allows you to add your own widgets to Qt Designer. The most flexible way to include a plugin with an application is to compile it into a dynamic library that is shipped separately, and detected and loaded at runtime. The applications can detect plugins that are stored in the standard plugin subdirectories. For more information on how to create and locate plugins and to change the default plugin path, see How to Create Qt Plugins. For more information about how to create plugins for Qt Designer, see Creating and Using Components for Qt Designer. Locating Qt Designer PluginsQt Designer fetches plugins from the standard locations and loads the plugins that match its build key. Qt Designer is delivered both as a standalone application and as part of the SDK, where it is integrated into Qt Creator. The correct folder to place the plugins depends on which one you use. The integrated Qt Designer fetches plugins from the %SDK%\bin\designer folder on Windows and Linux and QtCreator.app/Contents/MacOS/designer folder on Mac. To check which plugins were loaded successfully and which failed, choose Tools > Form Editor > About Qt Designer Plugins. The standalone Qt Designer is part of the Qt library used for building projects, located under %SDK%\qt. Therefore, it fetches plugins from the following folder: %SDK%\qt\plugins\designer. To check which plugins were loaded successfully and which failed, choose Help > About Plugins. Matching Build KeysThe Qt Creator that is included in pre-built SDK packages on Windows is built with the Microsoft Visual Studio compiler, whereas the version of Qt shipped for building applications is configured and built to use the MinGW/g++ compiler. Plugins built by using this version of Qt cannot be loaded by Qt Creator because the build-keys do not match. The plugins can only be used in the standalone version of Qt Designer. Choose Help > About Qt Creator to check the Qt version Qt Creator was built with. To use Qt Designer plugins that were built for the shipped Qt version, make sure that Qt Creator is built with the same compiler by either recompiling Qt Creator using MinGW or recompiling Qt with Microsoft Visual Studio, depending on which configuration you want to use for your applications.
© 2008-2010 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy X
|