The Qt Components provide a set of components that is used to create applications that have same look & feel as the system delivered components. However, the Qt Components itself does not guarantee a common look & feel. It is also important to use certain commonly used values like fonts, marging and spacings. This page lists the most common used ones.
Most commonly used margin is 16 pixels. It is used around the containers that contains the actual UI elements. For example pages will always have a 16 pixel margin on right and left. If any content is placed inside - for example text box with border - the content again has the 16 pixel marging to the parent container.
The default margin is accessed by DefaultMargin variable.
UiConstants.DefaultMargin
Placing of buttons follows the default margin in most of cases. However, if you place the buttons in a column the prefered spacing between the buttons is 6 pixels.
The default spacing is accessed with ButtonSpacing variable.
UiConstants.ButtonSpacing
When you create a header use margins and spacings:
Header height:
Spacing:
If the header is just used for text input is a special case, then the height is 80 pixels and margins at top and bottom is 14 pixels.
UiConstants.HeaderDefaultHeightPortrait UiConstants.HeaderDefaultHeightLandcape UiConstants.HeaderDefaultTopSpacingPortrait UiConstants.HeaderDefaultBottomSpacingPortrait UiConstants.HeaderDefaultTopSpacingLandscape UiConstants.HeaderDefaultBottomSpacingLandscape
List Items cover all common cases when things are presented in lists.
Three different heights are used for list items
These heights are accessed in the following way:
UiConstants.ListItemHeightSmall UiConstants.ListItemHeightDefault
When placing items inside the list item the following common values are used:
The font used by the application is called "Nokia Pure Text". It is set by default if developer uses Label as the text component.
The most commonly used text styles are:
You can access them directly using following:
UiConstants.HeaderFont UiConstants.GroupHeaderFont UiConstants.TitleFont UiConstants.SmallTitleFont UiConstants.FieldLabelFont UiConstants.SubtitleFont UiConstants.BodyTextFont
Access the field label font color using:
UiConstants.FieldLabelColor
© 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.