Porting Qt Quick Components to Symbian^1
Article Metadata
Compatibility
Platform(s): Symbian^1 and later, Qt 4.7 and later
Article
Keywords: Qt Quick Components, Porting, Symbian^1, Symbian 5th
Created: Sebastiano galazzo
(23 Apr 2012)
Last edited: hamishwillee
(11 Oct 2012)
Contents |
Introduction
The aim of this project is not to reinvent the wheel. Everything started when, decided to port my app developed for Symbian^3 with QtQuick Components to Symbian^1, I realized that I had to modify much code lines, most of which where of common components.
The project begins with one component, QueryDialog and will be updated each time will be added new components, as needed.
Components will be developed both in QML and Qt/C++ with the target to provide the same interface to minimize the effort.
Of course the project is opened for contributions.
Setup
- Download the project from here and include inside your project directory.
- Open your .pro file and add the following lines:
include(./QtQuick_Component_S1/qtquickcomponents1.pri)
QueryDialog
main.cpp
...
#include <QtDeclarative>
#include "QtQuick_Components_S1/QueryDialog.h"
...
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QApplication> app(createApplication(argc, argv));
...
qmlRegisterType<QueryDialog>("QtQuickS1", 1, 0, "QueryDialog");
...
}
QML
import QtQuickS1 1.0
Rectangle {
id: mainPage
QueryDialog {
id: bannedDialog
icon: "BlacklistManager64.png"
titleText: qsTr("Daily availability reached!")
message: qsTr("You cannot set more than one contact on free version.\nSwitch to Full Version to unlock all limits ?\n\n")
acceptButtonText: qsTr("Yes")
rejectButtonText: qsTr("No")
onAccepted: {
.....
}
onRejected: {
.....
}
}
}
At time of writing have been implemented the following properties:
- message
- titleText
- icon
- acceptButton
- rejectButton
The code snippet
class QueryDialog : public QObject
{
Q_OBJECT
Q_PROPERTY(QString message READ text WRITE setText)
Q_PROPERTY(QString titleText READ titleText WRITE setTitleText)
Q_PROPERTY(QString icon READ icon WRITE setIcon)
Q_PROPERTY(QString acceptButtonText READ acceptButtonText WRITE setAcceptButtonText)
Q_PROPERTY(QString rejectButtonText READ rejectButtonText WRITE setRejectButtonText)
.....
Work In Progress
- CheckBox
- ListItem

