Comments (1)
第一步 安装 Qt
分为两种情况: 1. 希望使用 Qt Quick 等先进Qt5技术, 2. 只需要 Qt 4.8的类库即可.
第一种, 直接去官网下载 Mac安装包, 在此不作过多说明, 开发时也不建议使用 Xcode, 不如直接使用 Qt Creator.
第二种, 建议使用 Homebrew 来安装.
brew install qt
第二步 新建Xcode 项目
打开 Xcode (以Xcode 6为例), 新建一个Command Line Tool 项目. 然后找到Link Binary With Libraries
, 如下图所示:
在里面点击 ➕ 并且选择Add Other... ,敲击Command+shift+g
, 在弹出的编辑框中输入:
/usr/local/Cellar/qt/4.8.6/Frameworks/
然后选择你要加载的Qt 库就行了.
如何加载已有的 Qt 工程?
找到 .pro 所在路径, 敲击以下命令:
qmake -spec macx-xcode project.pro
open project.xcodeproj
这里的 project.pro 请换成你自己的.pro 名字.
参考资料:
from qtlab.
Related Issues (12)
- 如何制作一个自适应缩放的坐标轴 HOT 18
- 如何计算字体的像素信息(长度?宽度?) HOT 1
- 如何获取鼠标滚轮滚过的距离? HOT 1
- QWidget 那么多获取边框的方法有啥区别?该怎么用? HOT 1
- 如何在QPainter里用鼠标滑动一根线。 HOT 2
- 如何变换鼠标的指针形状?都有哪些指针形状? HOT 1
- 能不能对QPainter中的线条增加右键菜单?并通过菜单修改颜色或删除? HOT 1
- 通过 QLinearGradient 进行线性插值之后,如何获取中间某位置的特定颜色? HOT 14
- 如何设置界面风格? HOT 2
- vs2010下无法创建Translation File HOT 1
- 想学习下Qt,讨论一下关注点. HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtlab.