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