Developing a Qt hello world App for mini2440

We must have precompiled Qt on our /usr/local/Qt as said in earlier post.Install Qt creator on your system from Ubuntu software centre

After sucessful installation you could open it on “Applications” -> “Programming” -> “Qt creator”.

Now we need to configure our new Qt creator to use the cross compiled Qt libraries for mini2440 and its qmake.Bcoz the target for our app is mini2440.

So now on Qt creator select ools > Options.

In “Options” window, click to “Qt4” -> “Qt Version“, on the right part you will see “Auto-detected” and “Manual“. Click on “Manual” and then choose plus (+) button located on the top right, in section “Version Name” you could let down what name you like (I typed “mini2440“). In section “QMake Location“, click on “Browse…” and you should indicate Qt creator know where the directory of qmake is. For what i did, I choose /usr/local/Qt/bin/qmake

If there is no errors we can see “Found Qt version 4.6.3, using mkspec /usr/local/Qt/mkspecs/qws/linux-arm-g++” under “Debugging Helper“. Click “Ok” to complete this mission.

Now is time to make new project, choose “File” -> “New File or Project” -> “Qt Gui Application” in “Project” section. Save it with some name

On clicking “Finish” you will reach here

Now doble click on Mainwindow.ui on the lefthand side

Now a QtDesigner window opens like this

Am adding a pushbutton to the gui window just drag and drop pushbutton from leftside

On task-bar, choose “Build” -> “Build All” to build the program. Click on “Run” button to see the result.we can see our gui window as a popup.

To cross-compile program for mini2440, choose “Project” section located on the left.In “Building Setting” change Qt version and edit build configuration to mini2440.

Okay, now you could cross-compile program for mini2440 by: “Build” ->  “Rebuild All“. Then select qmake.Right now, if you run program in Ubuntu, you will receive a fault with something like this (it’s because the program run on ARM processor, not on Ubuntu)

you can check the filetype of the executable by using file command it will show ARM

Copy the binary to the mini2440 using pendrive or sd card.To execute the binary run like this..

$ ./ex1 -qws

9 thoughts on “Developing a Qt hello world App for mini2440

  1. Hi .
    i am beginner to the Qt programming.
    i am following this tutorial.

    i dint get the following line.

    In “Options” window, click to “Qt4” -> “Qt Version“, on the right part you will see “Auto-detected” and “Manual“.

    i didnt get QT4 in the “Options” window.

    can anyone help me…?

  2. How to create QT Application for Mini 2440

    Hi, I am newbie at Mini 2440 an Qt programming . I have a mini 2440
    installed Qtopia in it . I also have a computer Ubuntu installed. I use Qt
    creator to create QT application.

    How to create and compile a QT program in Ubuntu pc for mini 2440 then load program to
    mini 2440 and run it.

    Can Anyone Please help me…
    Thank you..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s