Sunday, June 27, 2010

Hello Symbian on Nokia N95

OS: Windows 7
Development Tools: Nokia Qt SDK 1.0
Symbian device: Nokia N95 (It have to be pre-installed the required software as described in the article "Install Qt Software to Symbian device")

- Start Qt Creator

- Click File -> New File or Project...

- Select Qt C++ Project > Mobile Qt Application, click Choose...


- Enter your project name, eg. HelloSymbian, and location to create. Click Next.


- Accept the default selection to select all targets. Click Next.


- Accept the Class Information by clicking Next, then Finish.



Qt Creator create the files of the project for you. mainwindow.ui will be opened in Design mode automatically.

- Click on the MainWindow on the middle of the screen. The properties will be shown on the bottom-right. Change Width and Height of geometry to 240 and 320, it's the resolution of Nokia N95. The graph of the MainWindow will be changed accordingly.


- Drag a Label from the Widgets list to the MainWindow, resize it and type anything you want, say "Hello Symbian".


- Click File and Save All of your works.

- Click Build -> Build All

Run on true device

- Click on the device icon on the left and select Symbian Device.
Note that There is a red cross over the phone icon, because there are no Symbian device connected.


- Connect a Symbian device, it's N95 in my case, to PC via USB cable.

- Run the TRK application on the phone.

- The phone icon will changed to have green tick.Click it and wait.


- After a moment, your first Hello Symbian will be installed and run on your Symbian phone.
Hello Symbian run on N95
- Finished.

Saturday, June 26, 2010

Install Qt Software to Symbian device

In the new released Nokia Qt SDK, you can develope Qt application, deploy and run Qt applications on the Symbian device inside Qt Creator.

In order to deploy and run Qt applications on the Symbian device, the following software have to be installed on your Symbian device: Qt to Symbian device, QtMobility to Symbian device and TRK to Symbian device.

Installing Required Applications on Devices

The Nokia Qt SDK installation program creates shortcuts for installing the required applications on Symbian devices (you can also use any of the standard methods for installing applications on devices):


  1. Connect the device to the development PC with an USB cable in PC Suite Mode. If you have not previously used the device with Ovi Suite or PC Suite, all the necessary drivers are installed automatically. This takes approximately one minute.
  2. Choose Start > Nokia Qt SDK > Symbian > Install Qt to Symbian device and follow the instructions on the screen to install Qt 4.6.2 libraries on the device.
  3. Choose Start > Nokia Qt SDK > Symbian > Install QtMobility to Symbian device and follow the instructions on the screen to install Qt mobility libraries on the device.
  4. Choose Start > Nokia Qt SDK > Symbian > Install TRK to Symbian device and follow the instructions on the screen to install the TRK debugging application on the device.

    Note: To check the Symbian platform version of your device, see Device Details.

Note: If errors occur during the installation, copy the .sis files from \Symbian\sis to the device using USB storage mode. Then install them from the file manager on the device.

Building and Running Applications

You can test your application on a device by building and running it from Qt Creator for the Symbian Device target.

  1. Connect the device to the development PC through a USB cable. The target selector displays a green check mark when a device is connected.



    The tool tip of the target selector shows more details about the actual device that will be used when you run your application.

  2. Start the App TRK application on your device and deny the Bluetooth connection.
  3. Select Options to select USB as connection type.
  4. Click the Run button in Qt Creator.

Friday, June 25, 2010

Nokia Smart Installer for Symbian

Nokia Smart Installer for Symbian (or Smart Installer for short) is a deployment solution that ensures that installed 3rd party applications have always access to the required versions of their dependent libraries.

Nokia Smart Installer for Symbian v1.0

Nokia Smart Installer for Symbian is a deployment solution designed to ensure that although packaged in a small installer kit (*.sis file) an application can be deployed on a supported Symbian device which doesn't yet have the required add-on libraries. These libraries will be download and installed only when the installer detects that they are needed or that they should be upgraded. In particular this solution provides support for distributing Qt applications without embedding the large Qt libraries in the distribution package.

Nokia Qt SDK 1.0 Released

Nokia Qt SDKThe Nokia Qt SDK 1.0 for Symbian and Maemo/MeeGo development on Nokia devices is now available.


The Nokia Qt SDK 1.0 is available, and it offers a true cross-platform development environment allowing developers to create applications for both Symbian and Maemo devices. Installation is easy, as it only requires one installation package that downloads all of the Qt and Symbian/Maemo components that developers need using the same Qt Creator 2.0 as standard Qt SDK’s for use on Windows, Linux and Mac (beta).

The Nokia Qt SDK 1.0 includes the Qt 4.6 libraries plus additional API’s for mobile development. With a fast, new simulator along with on-device debugging and the ability to compile to both .sis (Symbian) or .deb (Maemo) packages, it provides developers with a great opportunity to start creating amazing apps right away.

Wednesday, June 9, 2010

Qt Creator 2.0: It’s a Release Candidate!

Qt Creator 2.0 Released Candidate! Creator works hand-in-hand with the Nokia Qt SDK, a release candidate of which has also been released today. One effect is that debugging on the Nokia N8, the first Symbian-based Nokia phone shipping with Qt, does now work. Another focus of this release is the documentation, which has been greatly improved to cover a lot more aspects of Qt Creator and how to develop with it.

But: Qt Quick support is now disabled by default, because Qt 4.7 will not be out by the time Nokia want to release Qt Creator 2.0. This means Qt Creator will come without Qt Quick functionality, even though loading Qt Quick files and projects is still possible. After 2.0 has been released, Nokia will bring back Qt Quick enabled nightly build as soon as possible.

read in more details: Qt Labs Blogs >> Qt Creator 2.0: It's a Release Candidate!

Nokia Qt SDK 1.0RC released

Today Nokia have published the Release Candidate for the Nokia Qt SDK 1.0. This is mostly a bug-fix release based on the input have been received. The download location is at Forum Nokia at the following link. Also Nokia have added the Release Candidate of Qt Creator 2.0 into this package.

Source: Qt Labs Blogs >> Nokia Qt SDK 1.0RC released



Tuesday, June 8, 2010

Nokia Releases Qt 4.6.3

Oslo, 08 June 2010 – Nokia today released version 4.6.3 of the Qt cross-platform application and UI framework. Qt 4.6.3 brings bugfixes and optimizations made based on feedback received from Qt users since the release of Qt 4.6.2. Also released is an updated version of the Qt Visual Studio Add-in.

Qt 4.6.3 is available as standalone binary or source packages, or bundled with the latest released version of the Qt Creator IDE (1.3.1) in an updated Qt SDK. All Qt releases are available for download from http://qt.nokia.com/downloads.

For a detailed list of changes introduced in Qt 4.6.3, consult the changes file found in the packages or browse the information on the Qt Developer Zone at http://qt.nokia.com/developer/changes/changes-4.6.3.





Sunday, June 6, 2010

HelloMaemo

Now create a HelloMaemo using Qt Creator:

- In Qt Creator, start a new project; click File -> New File or Project.

- Select Qt Application Project -> Mobile Qt Application


- Enter the name and location of you project.


- Accept the default selection on the targets for your project, all selected.


- Review your Class Information, & click Next.


- Click Finish


- Your first code will be generated, and the screen will be switched to Edit mode.
Extend Forms in the Projects pane, double click on mainwindow.ui to switch to Design Mode.



- Drag a Label to the from, adjust the location and size, double click on it and enter the text to be display, "Who are you?". Change the objectName under QObject property on the right to labelWhoAreYou.


- Add a Line Edit with objectName lineEditName, leave the text empty.
- Add a Push Button with objectName pushButtonOK and change the text to "OK".
- Add a Label with objectName labelHello and chnage the text to "I'm Maemo".


- Click on Edit to switch to Edit Mode, double click on mainwindow.h.
Add a slot to mainwindow.h

private slots:
void buttonClicked();



- Double click on mainwindow.cpp to connect with pushButtonOK signal clicked().

connect(ui->pushButtonOK, SIGNAL(clicked()), this, SLOT(buttonClicked()));

- And implement buttonClicked()

void MainWindow::buttonClicked()
{ ui->label_Hello->setText("Hello:" + ui->lineEdit_Name->text());
}



- Save All, and click on the green arrow to Run.



mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
Q_OBJECT

public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();

protected:
void changeEvent(QEvent *e);

private:
Ui::MainWindow *ui;

private slots:
void buttonClicked();
};

#endif // MAINWINDOW_H


mainwindow.cpp
#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(ui->pushButtonOK, SIGNAL(clicked()), this, SLOT(buttonClicked()));
}

void MainWindow::buttonClicked()
{ ui->labelHello->setText("Hello:" + ui->lineEditName->text());
}

MainWindow::~MainWindow()
{
delete ui;
}

void MainWindow::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}

Saturday, June 5, 2010

HelloQML

Let start our first QML application HelloQML:

- In Qt Creator, start a new project; click File -> New File or Project.

- Select Qt Quick Project - Qt QML Application, then click OK.


- Enter the name and location of you project.


- It's time to review your project setting, then click Finish.


- Double click on the generated .qml file to involve Qt Quick Design.
(In order to use the Qt Quick Design, you have to enable it; refer to the article Qt Quick Designer.)


- In Qt Quick Design, drag a Text and TextEdit to the panel.
Click to select Text(text1), chang the Text Property to "Who are you?"
Click to select TextEdit(textedit1), clear the Text Properties, and enable Cursor Visible under Text Input property.


- Then click on the Edit button on the left to involve the Editor.
Modify the code of text inside Text to
text: "Hello " + textedit1.text

import Qt 4.6

Rectangle {
width: 200
height: 200
Text {
x: 66
y: 127
text: "Hello " + textedit1.text
}

Text {
id: text1
x: 66
y: 61
width: 80
height: 20
text: "Who are you?"
}

TextEdit {
id: textedit1
x: 66
y: 83
width: 80
height: 20
text: ""
cursorVisible: true
}
}


- Click on the green arrow (Run) on the left to see the result.


- It's the first QML application, HelloQML.

Qt Quick Designer

Qt Quick DesignerThe Qt Quick Designer visual editor is provided as an experimental plugin that you must enable to be able to edit QML files in the Design mode.

Enabling the visual editor can negatively affect the overall stability of Qt Creator.





To enable or disable the Qt Quick Designer visual editor, select Help > About Plugins... > Qt Quick > QmlDesigner. You must restart Qt Creator to enable or disable the visual editor.


What's QML and Qt Quick?

QML is an extension to JavaScript, that provides a mechanism to declaratively build an object tree of QML elements. QML improves the integration between JavaScript and Qt's existing QObject based type system, adds support for automatic property bindings and provides network transparency at the language level.

The QML elements are a sophisticated set of graphical and behavioral building blocks. These different elements are combined together in QML documents to build components ranging in complexity from simple buttons and sliders, to complete internet-enabled applications like a Flickr photo browser.

Qt Quick provides a declarative framework for building highly dynamic, custom user interfaces from a rich set of QML elements. Qt Quick helps programmers and designers collaborate to build the fluid user interfaces that are becoming common in portable consumer devices, such as mobile phones, media players, set-top boxes and netbooks.

source: Qt Snapshot: 2010-06-05 (Saturday) 03:45:43: Qt Quick