To import a file in a supported foreign file format click File|Open, then click the File Type combobox to choose the file type you wish to load. Click the required file and Qt Designer will convert and load the file.
The filters that Qt Designer uses to read foreign file formats are 'works in progress'. You may have different filters available in your version of Qt Designer than those described here. The easiest way to see which filters are available is to invoke the file open dialog; all your filters are listed in the File Type combobox.
Qt Architect is a free GUI builder for Qt written by Jeff Harris and Klaus Ebner. The .dlg extension is associated with Qt Architect dialog files.
Qt Designer can read files generated by Qt Architect version 2.1 and above. When given a .dlg file from a previous version of Qt Architect, Qt Designer tells you how to convert it to the file format of version 2.1. (The conversion procedure varies depending on the version of the .dlg file.)
The import filter does a good job of importing .dlg files; the result is almost identical to what you get in Qt Architect. However, the C++ code that uses the dialogs will probably need some adaptation.
There are a few drawbacks to converting Qt Architect files to Qt Designer's format due to differences between the two tools; these are listed below:
Layout spacing and margins
If the .dlg file layouts use the Qt Architect defaults for layout spacing and margins, Qt Designer will override these with its standard defaults. You can change the "layoutSpacing" and "layoutMargin" properties manually afterwards if necessary.
Layout stretches and spacings
Qt Architect gives access to more features of Qt's layout system than Qt Designer, namely stretches and spacings. Qt Designer will attempt to cope with .dlg files that use these features, but sometimes the resizing will not be what you want. The solution typically involves setting the "sizePolicy" properties of some widgets and inserting or deleting spacers.
Mixing managed and unmanaged widgets
Qt Architect allows a widget to have some child widgets managed by a layout and other child widgets with fixed positions. When presented with a .dlg file that uses this facility, Qt Designer will silently put the fixed position widgets into the layout.
Pixmaps
Qt Designer ignores pixmaps specified in .dlg files. These have to be restored manually in Qt Designer.
Glade is a free GUI builder for GTK+ and GNOME written by Damon Chaplin. The .glade extension is associated with Glade files.
Qt Designer has been tested with Glade files up to version 0.6.0 and might work with later versions as well.
Although Glade does not target Qt, the layout system and the widget set of GTK+ are similar to those of Qt, so the filter will retain most of the information in the .glade file.
There are some considerations regarding the conversion of Glade files, as listed below:
Ampersands (&) in labels
Qt displays an ampersand when a QLabel has no buddy. (A buddy is a widget that accepts focus on behalf of a QLabel.) Glade allows GtkLabel widgets with an (underlined) accelerator key but with no buddy. This is an error since users expect underlined characters to be accelerators. In this situation, Qt displays the ampersand itself instead of underlining the accelerator key. You should go over these QLabel widgets and set their " buddy" property.
Layout placeholders
GTK allows a layout position to be occupied by a placeholder. Qt Designer converts those placeholders into QLabels whose text is "?" in red, so that you can find them and fix them manually.
GTK+ or GNOME widget with no Qt equivalent
Qt has equivalents for most GTK+ widgets, but Glade also supports GNOME, whose goal is to provide a complete desktop environment. Because Qt's scope is narrower, when Qt Designer encounters a widget it cannot convert, it replaces it with a label that indicates the problem. For example, a GnomePaperSelector will be replaced by a QLabel whose text is "GnomePaperSelector?" in red. If you are porting to KDE, you might want to use the corresponding KDE widget.
Other GTK+/GNOME widgets are only supported in certain contexts. For example, the GnomeDruid can be embedded in another widget, whereas the corresponding QWizard class cannot.
Message boxes and other high-level dialogs
Glade supports editing of GnomeMessageBox, GtkFileSelection, GtkFontSelectionDialog and others. This is trivially achieved in Qt by means of a QMessageBox dialog, a QFileDialog, a QFontDialog, etc., in C++ code.
Stand-alone popup menus
Qt Designer only supports popup menus inside a QMainWindow. If you need a stand-alone popup menu (presumably a context menu), you can easily write code that does this using QPopupMenu.
Size policy parameters
Glade provides size policies in the "Place" tab of the property editor. Qt Designer does not attempt to make use of the padding, expand, shrink and fill information, as the Qt defaults are usually good enough. In a few cases, you might have to set the " sizePolicy" property manually to obtain the effect you want.
GNOME standard icons
GNOME provides a large set of standard icons. Qt Designer will ignore references to these. If you are porting to KDE, you might want to manually set the standard KDE icons.
Packer layout
GTK+ provides a class called GtkPacker that provides for exotic layouts; Qt provides no QPackerLayout and never will. Qt Designer will treat packer layouts as if they were vertical layouts and you will probably have to change them to whatever combination of layouts that produces the right effect.
Incorrectly-justified text after conversion
The " hAlign" property is sometimes set wrongly, in which case you have to change it manually. It is caused by a quirk in Glade.