当前位置:网站首页>QT工具——moc、rcc、uic
QT工具——moc、rcc、uic
2022-07-16 22:16:00 【顺其自然~】
开始之前需要先引入资源的概念
qml的UI文件、qwidgets的ui文件、各种图片等,在开发阶段引入qt的工程,这些可以称之为资源。
除了资源,qt还扩展的c++语法(实现了信号槽等)
资源和扩展c++语法最终都会被qt整理成标准c++代码文件,然后调用gcc、msvc等编译器编译成可执行文件。
使用下面这三个工具把qt扩展的c++语言编译得到标准c++语言
1、moc.exe 把qt扩展的c++语法编译成标准c++代码。(moc 全称是 Meta-Object Compiler,也就是“元对象编译器”。)
2、rcc.exe把.qrc文件(qml的UI资源和图片等)编译成标准c++代码(rcc全称是resource compiler)
3、如果使用了qwidgets,那么继续使用uic.exe把.ui文件编译成标准c++代码(uic全称是ui compiler)
4、qmake、或者cmake生成makefile
5、编译器msvc或者gcc编译标准c++打码代码成exe程序

a、.qrc包含了qml与图片等资源,rcc把他们编译成cpp文件
b、uic把.ui文件编译成.h文件(仅针对qwidgets)
c、调用moc把qt扩展的语法编译成标准c++语法moc widget.h -o moc_widget.cpp

这些工具分别在这里:

rc文件
Windows系统的资源配置文件

如果使用mingw编译器


边栏推荐
- Install Apple CMS and its resource collection and page code from 0
- 云平台简易上手操作
- Summary of this week 2
- Pytest interface automation test framework | secondary encapsulation of requests
- 15. Sum of three numbers [list < list < integer> > ans, ans.add (arrays.aslist (num[i], num[j], num[k]))]
- 【百度飞桨】手写数字识别模型部署Paddle Inference
- How to improve query efficiency by using virtual columns provided by mysql5.7
- Redis distributed cache - redis master-slave
- P5.js grow up JS special effect
- Openpose: estimation de la pose 2D Multi - personnes en temps réel à l'aide d'un champ d'affinité partiel
猜你喜欢

How to deal with common errors in MySQL installation

MySQL storage model

單行文本 超出部分省略號,多行文本超出部分省略號,指定多行

WordPress主题分享:Avada主题v7.8.0免费下载 2022年最新版

fiddler抓不到PC端微信小程序的包

Ngrx store state management

毕业四年换了3份软件测试工作,我为何依然焦虑?

Shh! Fishing artifact, don't let the boss know| Real time voice to text, fast time sequence prediction, yolov6 can be used in one line of command to sort out CSV | showmeai Information Daily

Une seule ligne de texte dépasse l'ellipse partielle, plusieurs lignes de texte dépassent l'ellipse partielle, spécifiez plusieurs lignes

p5js咖啡杯冒热气js特效
随机推荐
利用备份恢复数据库,但是没有控制文件文件如何解决
GDB debugging skills: positioning program stuck problem
为什么 Nodejs 这么快?
Pytest interface automated testing framework | project practice (pytest+allure+ data driven)
学习要有激情
WordPress主题分享:The7主题v10.11免费下载 2022年最新版
liunx中FileDescriptor与打开文件之间的关系
China carbon ceramic composite market research and investment forecast report (2022 Edition)
10. Find out the JVM operation status
每日一题:合并两个排序的链表(剑指offer25)
nodejs不支持ES6模块化规范的解决方案
Introduction to the universal theme system of SAP appgyver
从编译器对指令集的要求看API设计原则
Eat chicken, throw away some supplies, and the Jedi survive
Summary of this week 2
毕业四年换了3份软件测试工作,我为何依然焦虑?
2022最新汉化camtasia studio电脑录制屏幕工具
nodeJS编译环境下使用yarn工具的安装与使用方法
MySQL安装常见报错怎么处理
MySQL约束知识点实例分析