Saving, Previewing and Printing Forms in Qt DesignerAlthough Qt Designer's forms are accurate representations of the components being edited, it is useful to preview the final appearance while editing. This feature can be activated by opening the Form menu and selecting Preview, or by pressing Ctrl+R when in the form. The preview shows exactly what the final component will look like when used in an application. Since Qt 4.4, it is possible to preview forms with various skins - default skins, skins created with Qt Style Sheets or device skins. This feature simulates the effect of calling QApplication::setStyleSheet() in the application. To preview your form with skins, open the Edit menu and select Preferences... You will see the dialog shown below: The Print/Preview Configuration checkbox must be checked to activate previews of skins. You can select the styles provided from the Style drop-down box. Alternatively, you can preview custom style sheet created with Qt Style Sheets. The figure below shows an example of Qt Style Sheet syntax and the corresponding output. Another option would be to preview your form with device skins. A list of generic device skins are available in Qt Designer, however, you may also use other QVFB skins with the Browse... option. Since Qt 4.4, it is possible to view code generated by the User Interface Compiler (uic) for the Qt Designer form. Select View Code... from the Form menu and a dialog with the generated code will be displayed. The screenshot below is an example of code generated by the uic. Forms created in Qt Designer can be saved to an image or printed. To save a form as an image, choose the Save Image... option. The file will be saved in .png format. Printing Forms To print a form, select the Print... option. [Previous: Using Layouts in Qt Designer] [Next: Qt Designer's Buddy Editing Mode] © 2008-2011 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 Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. |