安裝qt-creator
brew install qt-creator
安裝qt
brew install qt
- 查看qt安裝路徑
brew info qt
zhb@bindembp ~ % brew info qt
==> qt: stable 6.6.1 (bottled), HEAD
Cross-platform application and UI framework
https://www.qt.io/
/opt/homebrew/Cellar/qt/6.6.1 (14,396 files, 623.5MB) *
/opt/homebrew/Cellar/qt/6.6.1就是qt安裝路徑
配置qt-creator
添加時(shí)選擇[qt安裝目錄]/bin/qmake

iShot_2024-02-23_05.36.01.jpg
選擇qt版本、CMake Tool、編譯器,如果是m1、m2等系列cpu的macbook,切換arm-darwin-generic-mach_o-64bit為默認(rèn)再開始設(shè)置

iShot_2024-02-23_05.39.48.jpg
創(chuàng)建Qt Quick項(xiàng)目

iShot_2024-02-23_05.42.51.jpg
運(yùn)行

iShot_2024-02-23_05.47.15.jpg