mac install qtcreatorおよびqt5



Mac Install Qt Creator



  1. 最初にqt5をダウンロードし、homebrewで直接インストールします
(base) [root@xxxxx ~]$brew install qt5 Updating Homebrew... ^C ==> Downloading https://homebrew.bintray.com/bottles/qt-5.13.2.mojave.bottle.tar Already downloaded: /Users/chenzhijie/Library/Caches/Homebrew/downloads/bfbceeb9e08901674d8dc52fcef59de47823a9e85c6712537e3f99a2820c79a5--qt-5.13.2.mojave.bottle.tar.gz ==> Pouring qt-5.13.2.mojave.bottle.tar.gz ==> Caveats We agreed to the Qt open source license for you. If this is unacceptable you should uninstall. qt is keg-only, which means it was not symlinked into /usr/local, because Qt 5 has CMake issues when linked. If you need to have qt first in your PATH run: echo 'export PATH='/usr/local/opt/qt/bin:$PATH'' >> ~/.bash_profile For compilers to find qt you may need to set: export LDFLAGS='-L/usr/local/opt/qt/lib' export CPPFLAGS='-I/usr/local/opt/qt/include' For pkg-config to find qt you may need to set: export PKG_CONFIG_PATH='/usr/local/opt/qt/lib/pkgconfig' ==> Summary /usr/local/Cellar/qt/5.13.2: 9,861 files, 336.5MB
  1. 次に、同じ自作のqtcreatorをダウンロードします。今度はcaskを使用する必要があります。
(base) [root@xxxxx ~]$brew cask install qt-creator Updating Homebrew... ^C ==> Downloading https://download.qt.io/official_releases/qtcreator/4.10/4.10.2/q ==> Verifying SHA-256 checksum for Cask 'qt-creator'. ==> Installing Cask qt-creator ==> Moving App 'Qt Creator.app' to '/Applications/Qt Creator.app'. qt-creator was successfully installed!
  1. qtクリエーターを開いた後、qtバージョンを自分で設定する必要があります。上記の設定にqtバージョンを手動で追加しますbrew install qt5背面の下部に、概要に/usr/local/Cellar/qt/5.13.2があることがわかります。したがって、このファイルにbin / qmakeファイルを追加し(command + shift +。すべての非表示フォルダーを表示)、完了後に次の図が完成します。
    画像
  2. そして、Preference / Kitでgccをclangに変更し、qt verisonを追加すると、次の図が完成します。
    画像
  3. 最後に、QTクリエーターフォルダーが自分で作成される新しいqtウィジェットプロジェクトを作成してみてください。
    画像
    画像
    画像
    画像

画像
画像

画像
ウィンドウを表示します〜