当前位置:网站首页>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
边栏推荐
猜你喜欢
Project (5) - Small target detection tph-yolov5
To write good test cases, you must first learn test design
Huawei od dice js
What level of software testing does it take to get a 9K job?
4、敏感词过滤(前缀树)
加密公司向盗窃的黑客提供报价:保留一点,把剩下的归还
学习DAVID数据库(1)
MPPT太阳能充放电控制器数据采集-通过网关采集电池电压容量电量SOC,wifi传输
11、Redis实现关注、取消关注以及关注和粉丝列表
Discourse Custom Header Links
随机推荐
如何搭建私有yum源
10 权限介绍
The principle of complete replication of virtual machines (cloud computing)
Number 16, top posts
6、显示评论和回复
公司官网建站笔记(六):域名进行公安备案并将备案号显示在网页底部
Mycat's master-slave relationship, vertical sub-database, horizontal sub-table, and detailed configuration of mycat fragmented table query (mysql5.7 series)
Classic linked list OJ strong training problem - fast and slow double pointer efficient solution
LeetCode 1161 最大层内元素和[BFS 二叉树] HERODING的LeetCode之路
【C语言】求两个整数m和n的最大公因数和最小公倍数之和一般方法,经典解法
软件积累 -- 截图软件ScreenToGif
Clustering index, and what is the difference between a clustering index
YOLOV5 study notes (3) - detailed explanation of network module
多线程下类对象的服务承诺探讨
15、网站统计数据
YOLOV5 study notes (2) - environment installation + operation + training
Draw Your Cards
JS function this context runtime syntax parentheses array IIFE timer delay self.backup context call apply
【shell基础】判断目录是否为空
医疗影像领域AI软件开发流程