当前位置:网站首页>VS QT——ui不显示新添加成员(控件)||代码无提示
VS QT——ui不显示新添加成员(控件)||代码无提示
2022-07-31 02:55:00 【阿根=_=】
场景1:新建项目,在ui里编辑之后,新添加的控件不显示代码提示。
场景2:成员 ui 报错 不允许使用不完整的类型
因为是刚开始学,花了两三天才找到解决办法。
网上方法: 重新编译 ui文件 + 重新扫描解决方案 (但是我这里还是无法解决)
根本原因:缺少xxx.ui 的头文件(即 ui_xxx.h) 头文件默认生成在debug/uic下 所以默认没有添加到项目中,所以 识别不到。
默认没有ui_xxx.h头文件
下ui_xxx.h文件内 可以看到 ui里的成员都在内
解决方法:添加此头文件即可。 目录 项目\Debug\uic\ui_xxx.h
------------------------------------------------------
中文乱码问题
解决:
main.cpp中添加
#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")// 该指令仅支持VS环境
#endif
边栏推荐
- Classic linked list OJ strong training problem - fast and slow double pointer efficient solution
- 10 Permission introduction
- 华为分布式存储FusionStorage知识点总结【面试篇】
- C#远程调试
- 【Android】Room —— SQLite的替代品
- f.grid_sample
- Office automation case: how to automatically generate period data?
- 12 Disk related commands
- What is distributed and clustered?What is the difference?
- The principle of complete replication of virtual machines (cloud computing)
猜你喜欢
Word/Excel fixed table size, when filling in the content, the table does not change with the cell content
编译Hudi
【银行系列第一期】中国人民银行
Crypto Firms Offer Offer To Theft Hackers: Keep A Little, Give The Rest
Classic linked list OJ strong training problem - fast and slow double pointer efficient solution
Software accumulation -- Screenshot software ScreenToGif
The application of AI in the whole process of medical imaging equipment
12 Disk related commands
数学解决——环形链表问题
Pythagorean tuple od js
随机推荐
AI中的数学思想
The comprehensive result of the case statement, do you know it?[Verilog Advanced Tutorial]
String为什么不可变?
How to do a startup CTO?
SQL injection Less54 (limited number of SQL injection + union injection)
10. Redis implements likes (Set) and obtains the total number of likes
LeetCode Daily Question 2022/7/25-2022/7/31
MPPT太阳能充放电控制器数据采集-通过网关采集电池电压容量电量SOC,wifi传输
Android's webview cache related knowledge collection
SQL注入 Less46(order by后的注入+rand()布尔盲注)
19.支持向量机-优化目标和大间距直观理解
Crypto Firms Offer Offer To Theft Hackers: Keep A Little, Give The Rest
修改未正确放入沙盒造成苹果兼容性问题
CorelDRAW2022精简亚太新增功能详细介绍
What is distributed and clustered?What is the difference?
英特尔软硬优化,赋能东软加速智慧医疗时代到来
JS 函数 this上下文 运行时点语法 圆括号 数组 IIFE 定时器 延时器 self.备份上下文 call apply
什么是分布式锁?实现分布式锁的三种方式
mycat的主从关系 垂直分库 水平分表 以及mycat分片联表查询的配置详解(mysql5.7系列)
【shell基础】判断目录是否为空