Thursday, December 31, 2009

Installing Qt 4.6 SDK in Windows 7

I'm planning to do some Qt for Symbian development. Qt Creator 1.3 has some support for Qt+Symbian development, but only on Windows. Although I love Ubuntu, currently I have to bow to the powers that be. No need to fight this (eventually I believe it'd be as easy to develop Qt Symbian apps on Linux).

Preparing Qt Development

  1. Download Qt Development Environment for Windows. (choose the complete bundle)
  2. Install the Qt IDE package.
    During this step I noticed that current Qt 4.6 bundle uses MinGW 3.15 aka GCC 4.4. I can foresee some problems with Qt Mobility. But I'll save my headaches for later.
Here's what Qt Creator 1.3 welcome page looks like: (nothing much, I know)


Simple Greeting Application


Of course installation of powerful IDE won't be complete without creating a trivial application:


Add some code:

void MainWindow::on_nameEdit_textChanged(QString name)
{
    ui->greetingLabel->setText("Hello " + name);
}

And here's the app in its full glory ;-)



Qt Command Line Environment


To enable compilation of Qt apps/libraries (such as Qt Mobility library) from the command line/shell, you must launch the command prompt from "Qt Command Prompt" launcher.



If you're already on a command prompt, you can setup Qt command line environment by running:
C:\Qt\2009.05\bin\qtenv
Use the Qt location installed on your system.

2 comments:

  1. To enable compilation of Qt apps/libraries (such as Qt Mobility library) from the command line/shell, you must launch the command prompt from "Qt Command Prompt" launcher. Track Kik Ip

    ReplyDelete

Be the first to comment!