Qt5 For Mac

admin 12/4/2021

Qt mac free download - Qt SDK, WinZip Mac, Qt Creator IDE, and many more programs. Qt5 on Mac OSX looks great due to all of the native-looking widgets (see e.g. Macintosh Style Widget Gallery). I'd like to perform some surgical replacements of a number of style properties in my application, but otherwise keep the native look-and-feel. What to Consider. The Qt framework is available under both open source and commercial licenses. This dual-licensing model is based on the principal of quid pro quo – roughly meaning “something for something.”. Simply put, this is how it works: In return for the value you receive from using Qt to create your application, you are expected to give back by contributing to Qt or buying Qt.

About the App

  • App name: Qt Creator
  • App description: qt-creator (App: Qt Creator.app)
  • App website: http://qt-project.org/

Install the App

  1. Press Command+Space and type Terminal and press enter/return key.
  2. Run in Terminal app:
    ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
    and press enter/return key.
    If the screen prompts you to enter a password, please enter your Mac's user password to continue. When you type the password, it won't be displayed on screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish.
  3. Run:
    brew cask install qt-creator

Done! You can now use Qt Creator.

Similar Software for Mac

Two earlier blog posts (1) (2) covered how to set up Qt and Qt Creator on Windows and Linux systems. Let's look at installation on the remaining major desktop platform, macOS.

For

Thanks to the unified Qt installer, the process is very similar to that on Windows and Linux, so we'll just cover some of the differences and highlights of the Mac install.

Assumptions and Prerequisites

For this example we'll install Qt 5.7.1, which is supported on macOS version 10.8 and later.

Qt For Mac Download

The C++ compiler used by Qt on macOS is the Clang compiler, provided as part of the Xcode development tool. You will need to install Xcode from the Apple App Store. It is a free download, but you will need to have or create an Apple ID.

You can also use Qt and Qt Creator on macOS to develop for iOS (i.e. for iPhone, iPod Touch, and iPad devices), or for Android (or both). These use different downloads of Qt and have more prerequisites and won't be covered here.

Installation Steps

Download the Qt installer from http://download.qt.io. For Qt 5.7.1 you can navigate to official_releases / qt 5.7 / 5.7.1 and then download qt-opensource-mac-x64-clang-5.7.1.dmg. It is a reasonably large (1.2 GB) download.

Once it has downloaded, open the dmg file:

Mac


From the Qt Installer, follow the wizard screens in the same fashion as on Windows and Linux. Here were the screens I stepped through:

Qt5 Macports


Once done, you can launch Qt Creator:

You should check that it correctly set up at an auto-detected kit with the compiler, Qt version, and debugger:


This is a good time to create some sample projects to test your installation. Use the New Project Wizard and confirm that you can create the project, build it and run the application. Testing both widget and QML-based projects is recommended.


You are now ready for Qt software development on macOS. If you want to update, add or remove any components, you can run the maintenance tool, which will be found under the Qt install directory as MaintenanceTool.

Qmake Mac

Summary

It's easy to get Qt up and running using the installer. I'm not a regular macOS user so on the occasions where I need to build a Qt application for the Mac, I appreciate that I can use the familiar Qt Creator IDE to do most of my work rather than having to learn another IDE.

References

Qt5 Mac Os El Capitan

  1. Getting Started with Qt and Qt Creator on Linux, ICS blog post, http://www.ics.com/blog/getting-started-qt-and-qt-creator-linux
  2. Getting Started with Qt and Qt Creator on Windows, ICS blog post, http://www.ics.com/blog/getting-started-qt-and-qt-creator-windows
  3. Qt for MacOS, Qt documentation web site, http://doc.qt.io/qt-5/osx.html
  4. Xcode 8, Apple Developer website, http://developer.apple.com/xcode