Build Your Qt Project on Windows and Mac OSX

Why i needed to build my app on another platform?

I’ve used Qt just for its cross platform-ness indeed its “code less and do more ” paradigm is apt  so there were hinderances in using MinGW compiler to build my project targeted to windows platform, below is the listed procedure and screenshots

Its a 2 Stage Process, Installing Libraries and building your project

Working on Microsoft Windows 7 and Mac OSX Snow Leopard

*Note: Phew Dont Worry its very simple, ive just added some information, so it looks little long



  1. mingw-get-inst
  2. Qt libraries 4.8.2 for Windows (or Higher Version)
  3. Your .proj file (Associated .ui, .cpp, .h etc)

STAGE 1: Setting up the environment

Step1:Download and install mingw-get-inst

Get if from here
You would need this as in Qt libraries installation it will ask you for the g++ component

Do select

  • C Compiler
  • C++ Compiler
  • MingW Developer Toolkit

Step2:Download and Install Qt libraries 4.8.2 for Windows

  1. Goto :
  2. Scroll down to Qt Library
  3. and choose your version

*Choose with minGW*

ex:Qt libraries 4.8.2 for Windows (minGW 4.4, 318 MB)

You Can get the above file from here

and finish the installation in case if it asks you for g++ component , point to the MinGW/bin folder you just installed in step1

Step4:Setting Up Environment Variables

In User variables create

Variable                 Value

QMAKESPEC          win32-g++

QTDIR                      C:\Qt\4.8.2

*The above value is the  location where you installed your version of Qt
















Next: Set the Path Variable

add this

*They are locations where you installed MinGW and Qt respectively







STAGE 2: Make and Build Project

Step1:Goto Start > All Programs > Qt by Nokia v4.8.2 (MinGW OpenSource)>Qt 4.8.2 Command Prompt
Now you can put your folder containing .proj file (Associated .ui, .cpp, .h etc) in one folder and placethem in C:\Qt\4.8.2
In the Screenshot the folder where my project files reside are in Galaxyand Galaxy.proj is the project file
Now go to the Galaxy Directory as cd Galaxy

Step2: Make

qmake -o Makefile

Step3: Build

mingw32-make -f Makefile.Debug












Now Within Galaxy Folder you have Debug and Release where your executable .exe file resides

Now Enjoy Making Projects on Mac OSX and Easily Deploy on Windows too

Here are the screenshots for my prototype apllication in windows and OSX

*Censored as it is a Coveted Project 😀 *

Deployed on  Mac OSX (Project Written and Built Initially):
















Deployed To Windows:


Solution for Pointer Content Bug in Netbeans 7.1

Using Netbeans 7.1

I had a pointer variable declared as

int **nodes

As program continued ,i allocated size on the fly and at a point i needed to watch the contents of this pointer (as an array of values)

The watch pane of Netbeans does not reflect the values


Create a watch with  *nodes@22

where you want to watch  all the values in nodes[22][]

Attached Screenshot for reference

in the picture 1st three rows reflect the bug

and post that row is the solution ! Happy Debugging!!!!

Note: For n00bs , you can add a Watch in Variables too !!! 😀


netbeans bug.jpg

Execute SQL Query On Single Processor

I had to execute a query on my system and wondered how a parallel execution on single processor differs from executing the same in multiple processor,so i have used this small fragent or so colled option to force my query to run on single processor, surprisingly the results where faster when compared to multi processor execution .. Also do rember this does not apply to all queries, will be trying to find the reason for this abnormal but awesome behaviour

So how to Force Execute on Single processor?

At the end of your query just give




Select *

From DB



Try it out and see performance difference using the Execution Plan Tab on VS!

Zip in Terminal (Mac/Linux)

Need to Zip Contents Using Terminal?


1.Because Your are working remotely?

2.May be your Connected to a machine Via SSH or alternative for it

3.You have access to Terminal Only

4.Duh! Just Wanna Know

Here are the steps:

1.Go to the Directory Which has the folder to be zipped (here Directory is Rahul and it has folder called Progs that has to be zipped

2.Use zip -r A B

Where A is the name of the eventually zipped file

B is the Folder to be Zipped

-r is Recursively descent the contents and apply zip (needed)


Terminal Zip.png

Flight Control [IOS] Goes Free

Flight Control , The Game We have been playing (Most Of You i suppose, or at least the ones reading this post are Interested 😉 ) Goes Free on Itunes (as Mentioned For Today)

Also it features:

  • Storm Field – A New Kind of Map
  • Turn The Time Back- Rewind (as they call)
  • Thunderstruck – Unlockable Achievement


Continue reading

Only EDGE data mode on android

Why Would You Want to Get Only EDGE Data Mode On Your Android ? (Probable reasons are listed below)

  1. Because i just want to cut my 3G/4G data usage!
  2. Ive got only EDGE Plan.
  3. I Think Keeping Phone in EDGE Mode will save my battery (well the phone uses Data When it Really REQUIRES!!)

Ah..gimme the procedure man!


1.Goto Settings> Wireless and Network > Mobile Network Settings

2.Set the Network Mode To GSM Only

Your Done now you will be in EDGE Mode all the time, if you want to use your 3G then set it to GSM/WCDMA (Auto)

Screenshots: (This is Galaxy Note People! )


Continue reading