[Platform Notes]
Platform Notes - Maemo 5
Maemo 5 (Fremantle)
Although Maemo 5 uses a fairly standard Linux/X11 setup, its compositing window manager and native UI toolkit (Hildon) make it necessary to be aware of a few specialities of this platform, if the Qt application should look and feel the same as a native Maemo 5 application.
Window Manager
UI style guides
Style guides are available from Forum Nokia, which describe in detail how a Maemo 5 user interface should look and behave. Qt tries to follow the style guide closely, but there are many things which have to be done on the application side to completely follow these guidelines:
Here is a list of common questions and problems when developing for Maemo 5:
- Not all of Qt's standard widgets are styled in a Maemo 5 way, simply because the Hildon toolkit only supports a limited number of widgets. Those widgets classes are fully supported: QLabel, QPushButton, QToolButton, QCheckBox, QRadioButton, QComboBox (though combo boxes behave a bit differently to those on desktop platforms), QSpinBox, QSlider, QLineEdit, QTextEdit, QPlainTextEdit, QProgressBar, QAbstractItemView (and derived classes).
- Qt for Maemo 5 ships with a separate library (QtMaemo5) which implements all the special Hildon UI elements that could not be mapped to already existing Qt widgets: QMaemo5ValueButton, QMaemo5AbstractPickSelector (and derived classes), QMaemo5EditBar and QMaemo5InformationBox.
- Qt fully supports the kinetic finger-scrolling that is used everywhere in the native Maemo 5 software. The algorithm for this is implemented in the Maemo 5 specific, public QAbstractKineticScroller class, while the specific implementations of this interface for QAbstractScrollArea (and derived classes) as well as QWebView are private to those classes. Please see the QAbstractKineticScroller documentation for more information.
The maemobrowser example in examples/maemo5 shows one way how to implement kinetic scrolling of QGraphicsWebView.
- Maemo 5 has a special application menu that is triggered by clicking on the application's title bar. Qt will use all visible and enabled actions it can find in the uppermost QMenuBar of the active window to fill this menu. All QMenuBar widgets will be hidden automatically on creation. In order to support the Maemo 5 filter groups in the application menu, Qt will map all QActions within the menu bar belonging to an exclusive QActionGroup to these filter buttons.
- Dialogs are not allowed to have a Cancel button, but clicking into the blurred area above the dialog will effectively cancel it. Qt supports this special behavior via QDialogButtonBox. Please note that if your QDialogButtonBox does not include a Cancel button, the QDialog cannot be cancelled by clicking into the blurred area, which means that the dialog works exactly like a Hildon Confirmation Note in this case.
- QTextEdit and QPlainTextEdit are fully Maemo 5 style guide compliant. This means that these widgets will not show scrollbars, will not allow the user to select text and will not have kinetic scrolling enabled by default.
The textedit example in examples/maemo5 shows how to dynamically resize QTextEdits the Maemo 5 way.
Known Limitations
- QSound does not work due to missing NAS libraries.
- QApplication::beep() does nothing since the X11 server's X XBell() function call is not implemented on the N900.
In addition, the PR 1.1 firmware release for the N900 contains several known issues that will be resolved with the next (PR 1.2) firmware release.
If you still want to test Qt 4.6 on PR 1.1, you have to use the unsupported libqt4-maemo5- prefixed packages from the Maemo extras-devel repository which will install to /opt. On PR 1.2 however, Qt 4.6 is already a part of the firmware and is installed in /usr.
[Platform Notes]
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) |
Trademarks |
Qt 4.6.2 |