This is just a quick note on how to get up and running really fast with Qt on a mac.
- Go ahead and download the installer from the Qt site.
- Install Qt and note where you created the QtSDK directory
- Add /…/QtSDK/desktop/…/bin to your shell path. (This ensures qmake is on the path among other things)
That’s it. I found a reasonable tutorial here. BUT, there’s one more slight rub.
If you follow through that tutorial, you’ll see that Qt prefers you to use their own autotool-like cross platform build system. This usually involves issuing the three shell commands “qmake -project” “qmake” and then “make” in succession. However, on mac, doing this will get you an app bundle. What if you still want to be able to print to standard out and launch the program from the terminal in the normal unix fashion?
This can be fixed by editing the project_name.pro file generated when you issue “qmake -project” Simply add the following line:
Then the qmake toolchain will generate a nice normal unix program. If you want to create an app bundle to distribute, just remove the line, and you’ll be all set again.