当前位置:网站首页>Qt: accessing controls in other forms
Qt: accessing controls in other forms
2022-06-10 13:26:00 【Xiaoying Information Technology Service Department】
Qt Development , There is a large form embedded with a small form , Now you need to get the text of a control in the small form in the code of the large form .
I studied it , Found the answer :
Set the form's ui by public.
Large form :FormCL3P
Little window :Form3PType1
1. The ui Set to public
class Form3PType1 : public QWidget
{
//...
public: // Set to public
Ui::Form3PType1 *ui;
};2. Define global small form objects
//G Is a custom global class
G::form3PType1 = new Form3PType1();3. Access the controls of the small form in the form
qDebug() << "ANo: " << G::form3PType1->ui->tbxANo->toPlainText();Interface :

Output :

边栏推荐
- [deep learning] the credit card fraud anomaly detection based on the deep learning autoencoder is very effective
- 数码管驱动芯片+语音芯片的应用场景介绍,WT588E02B-24SS
- CoordinatorLayout使用浅析
- 十款好用跨浏览器测试工具分享,好物值得收藏
- "Reduce the burden" so that the "pig" can fly higher
- Qt数据库应用22-文件编码格式识别
- [Huang ah code] teacher, I want to choose software development related majors after the college entrance examination. Which direction do you think is better? How to fill in the college entrance examin
- Mr developed by unity3d realizes model occlusion and transparent ground receiving shadow
- 常识,神经元数量,小鼠的脑内神经元大约在7000万个、人类约有860亿个
- MySQL数据库(26):视图 view
猜你喜欢
![[flinlk] dynamic Kerberos authentication in Flink pit](/img/ba/3a85df364ae0bcfca38e5f26366c03.png)
[flinlk] dynamic Kerberos authentication in Flink pit

Final exam - Principles of compilation

【FAQ】运动健康服务REST API接口使用过程中常见问题和解决方法总结

【FLinlk】Flink小坑之kerberos动态认证

Unity3d uses URP rendering pipeline to realize ar shadow (shadow casting and transparent ground)

JS global timer case

3. web page development tool vs Code

Meetup review how Devops & mlops solve the machine learning dilemma in enterprises?

谷歌提出超强预训练模型CoCa,在ImageNet上微调Top-1准确率达91%!在多个下游任务上SOTA!

In depth analysis of "circle group" relationship system design | series of articles on "circle group" technology
随机推荐
[Huang ah code] teacher, I want to choose software development related majors after the college entrance examination. Which direction do you think is better? How to fill in the college entrance examin
数码管驱动芯片+语音芯片的应用场景介绍,WT588E02B-24SS
超详细的FFmpeg安装及简单使用教程
Find the number of common subsequences of K strings
Vdo-slam: a visual dynamic object aware slam system paper reading
12、 Process address space (PMAP; vdso; MMAP)
谷歌提出超强预训练模型CoCa,在ImageNet上微调Top-1准确率达91%!在多个下游任务上SOTA!
Binary XML file line 96: error inflating class & lt; unknown&gt;
Nanomq newsletter 2022-05 | release of V0.8.0, new webhook extension interface and connection authentication API
深度神经网络每秒分类近20亿张图像,新型类脑光学分类器芯片登上Nature
十款好用跨浏览器测试工具分享,好物值得收藏
CL210OpenStack操作的故障排除--常见核心问题的故障排除
Mysql database (26): View
[deep learning] the credit card fraud anomaly detection based on the deep learning autoencoder is very effective
[笔记]Windows安全之《三》Shellcode 补充之 Get-InjectedThread脚本搭建环境及其使用
3. 网页开发工具 VS Code
Introduction of Altium Designer
线性动态规划专讲
buuctf [Discuz]wooyun-2010-080723
Normal controller structure