How to install Qt Serialport on macOS?

a 夏天 提交于 2021-01-07 12:53:19

问题


I'm trying to compile this code where the .pro file includes a

QT += serialport

gives me a

Project MESSAGE: Warning: unknown QT: serialport

error. Without Qt, I would use CMake and install the package via vcpkg, Conan, HomeBrew, or something like that. But not sure if Qt has its own package manager. I would appreciate it if you could help me know what is the most canonical way to install and include this library.

P.S.1. In the comments, I'm being told that I need to use Qt's Maintenance Tool, which is sorta the internal package manager for Qt, to install QtSerialPort module. Given that I don't know how to install that via HomeBrew, I installed Qt Creator from the Qt website. I found the Maintenance Tool in <install_dir> the installation folder /Users/<user>/Qt/MaintenanceTool.app which I could open from the terminal by open MaintenanceTool.app while being in that folder. However, I can not see any QtSerialPort module in the options, nor a way to search.

P.S.2. Posted a new question here.

P.S.3. I think this issue arises because I had multiple versions of Qt installed. once I searched for locate qmake and found out the other versions I have installed (e.g., /System/Volumes/Data/usr/local/Cellar/qt/5.14.1/bin/qmake) I could just run that and the MakeFile was generated.

来源:https://stackoverflow.com/questions/61397688/how-to-install-qt-serialport-on-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!