Login procedures have been improved. Check this page for details.
PhoneGap for Qt 5
The goal of the project is to develop a version of Cordova for Qt 5. This will help the adoption of Qt 5 in general, and on platforms using Qt 5 such as the Raspberry Pi board, Nokia N9 (in future), and any future devices that run Qt 5.
The code is backwards source compatible with Qt 4 (using #ifdefs, etc. as needed).
Note that Cordova was formerly known as PhoneGap before being acquired by Adobe (you may also see references to the name Apache Callback).
The code is being developed publicly as an open source project. We have a blog that reports progress on the project.
As of April 2012 the code is considered beta quality and works with the Qt 5 alpha release.
The README.md file has some basic instructions on using Cordova for Qt.
If you are familiar with PhoneGap/Cordova but not Qt, you may find these links helpful:
If you are familiar with Qt but not PhoneGap/Cordova you may find these links helpful:
How To Contribute
We welcome anyone who wants to contribute to the the project in any way, whether it is development, testing, documentation, etc.
You can access the source code here. It is both for Qt4 and Qt5.
For project discussion, use the callback-dev mailing list and mention cordova-qt in the subject line.
If you have any questions, feel free to e-mail Jeff Tranter.
- Jeff Tranter, Engineering Manager
- David Jacobs, Project Manager
- Alejandro Narancio, Developer
- Denis Kormalev, Developer
- Longwei Su, Developer
Other developers who may help:
- Wolfgang Koller (Viras)- working on Qt 4 port
- Anis Kadri - liaison at Adobe
- Lauri Paimen - created experimental port of QML to the web browser. May be able to share code.
- Arend van Beelen jr. (Arendjr) - worked on Qt 4 PhoneGap
- Igor Montagner (igordsm) - worked on Qt 4 PhoneGap
- Bundyo - working on Harmattan PhoneGap port (unfortunately uses native Harmattan libs too) (Qt 4.7)
- Use the simulator provided by the Qt SDK.
- Use the Nokia N9 running Qt 5 as the reference platform for phone-specific hardware (GPS, touchscreen, sensors, etc.).
- Also use the Raspberry Pi running the QtonPi as a Qt 5 platform.
- The port should only call APIs from Qt 5 (including mobility) and so not be specific to the Raspberry Pi or N9.
- In general we won't implement any PhoneGap API functions that aren't supported by the underlying Qt 5.
Qt 5.0 will not be released until around summer 2012. Need a stable version that we can use before then. We are currently using what is in git and the Qt 5 alpha and beta releases as they become available.
The interface to WebKit exposed by QtWebKit is changing significantly with Qt 5 due to changes in WebKit.
Major Tasks and Milestones
These are the current planned tasks and dates we are working against.
|Set up git||23-Dec-2011||Done|
|Set up blog||23-Dec-2011||Done. http://phonegap.ics.com/|
|Set up mailing list||23-Dec-2011||Using callback-dev list|
|Select Qt 5 build||30-Dec-2011||Done|
|Set up Qt Creator/SDK||30-Dec-2011||Done|
|Finalize devices||30-Dec-2011||N9, Simulator, Emulator, Raspberry Pi|
|Obtain Raspberry Pi boards||01 Feb 2011||Not yet available|
|API Implementation Phase|
|Geolocation||06-Jan-2012||Uses the W3C Geolocation API specification which is supported by WebKit 2.|
|Media||06-Jan-2012||PhoneGap will be moving to follow the W3C specification which is supported by WebKit. For this reason we likely won't implement the PhoneGap Media APIs.|
|Storage||06-Jan-2012||Uses the W3C WebSQL Database and Web Storage API specifications which are supported by WebKit 2.|
|File||10-Feb-2012||Done. File Transfer API has no direct support in Qt Mobility so will not be implemented for now.|
|Notification||10-Feb-2012||Needs some reword for proper look and feel on different devices|
|Camera||17-Feb-2012||Implemented for Harmattan platform|
|Capture||17-Feb-2012||Not implemented, not supported by Qt Mobility|
|Final Testing and Release Phase|
|Qt 5 Feature Freeze||04 Feb 2012||Happenned|
|Qt 5 Alpha release||04 Apr 2012||Happenned|
|Testing on N9 (Qt 4)||Ongoing|
|Testing on N9 (Qt 5)||Ongoing|
|Qt 5 Beta release||TBD||Expected end of April 2012|
|Qt 5.0.0 release||TBD||Expected end of June 2012|
|Qt 5 Testing Completed||30 Jun 2012||Based on late June Qt 5 release|
Building Cordova Qt Using Qt 5 Alpha
The software will build using the Qt 5 Alpha. Build Qt 5 as per the instructions here. Cordova Qt also needs the add-on modules qtfeedback and qtpim which are not part of the Alpha. You need to check these out of git and build them as well, e.g.
tar xzf qt-everywhere-opensource-src-5.0.0-alpha.tar.gz cd qt-everywhere-opensource-src-5.0.0 git clone git://gitorious.org/qt/qtfeedback.git git clone git://gitorious.org/qt/qtpim.git export PATH=$PATH:$PWD/qtbase/bin ./configure -prefix $PWD/qtbase -opensource -confirm-license -nomake tests -nomake examples ./build -j 3
Or, if you have already built the Qt 5 Alpha, build the additional two modules using:
./configure -prefix $PWD/qtbase -opensource -confirm-license -nomake tests -nomake examples make module-qtfeedback make module-qtpim
Then build Cordova Qt as usual, i.e. make sure that the Qt 5 qmake is in your PATH, and run qmake and then make (or do the equivalent if using an IDE like Qt Creator).
- some features are only supported on certain platforms due to limitations of Qt Mobility or platform-specific code
- QtWebKit2 currently has an issue with mouse press events not working on the desktop. Waiting on QtWebKit team to solve it.
Tips and Tricks
Here are some things we found when building Qt 5, WebKit, and Cordova Qt.
- When running cordova-qt on a real device (e.g. N9) it helps to run it by sshing to the device and starting it in the right directory so it will find the www/index.html and other files (you also had to copy these files to the phone).
- You may want to build each module of Qt 5 individually to save time and have better control over what is built
- If you want Geolocation support, build WebKit with the ---geolocation --client-based-geolocation
- Project Blog
- PhoneGap project site
- Apache Cordova project incubator site
- Source code repository
- Read-only mirror of repository for pull requests
- QtonPi project
- How to build Qt 5 from git
- How to build QtWebKit from git
- See this video from Bundyo showing initial PhoneGap support for MeeGo 1.2 Harmattan (Qt 4.7)
- Github PhoneGap fork for Harmattan from Bundyo. Initial seed, started implementing Contacts API.
- QMLWeb is another reference to consider. His maintainer, Lauri Paimen, is aware of this PhoneGap project.
- Wikipedia PhoneGap app first hand experiences targeting Android (more complex than planned) and then porting to iOS, Blackberry, etc (a lot easier then expected).
- Video with Wikipedia PhoneGap app running on Harmattan (using qt4).