当前位置:网站首页>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 :

边栏推荐
- Z-Wave ecosystem status report in 2022
- Find the number of common subsequences of K strings
- 讓資源在雲端和本地自由流動
- 什么是基因的p值?
- Neuron Newsletter 2022-05|新增 2 个南向驱动和 1 个北向应用、Modbus TCP 实现定制扩展
- [Netease Yunxin] in depth analysis of the design of "circle group" relationship system | series of articles on "circle group" technology
- 'getWidth()' is deprecated,'getHeight()' is deprecated
- Snackbar使用详解
- Neuron Newsletter 2022-05|新增 2 個南向驅動和 1 個北向應用、Modbus TCP 實現定制擴展
- [NLP] NLP full path learning recommendation
猜你喜欢

将anaconda的bin目录加入PATH

【无标题】音频蓝牙语音芯片,WT2605C-32N实时录音上传技术方案介绍

Google proposed the super pre training model coca, and the accuracy of fine-tuning top-1 on Imagenet reached 91%! SOTA on multiple downstream tasks!
![[deep learning] the credit card fraud anomaly detection based on the deep learning autoencoder is very effective](/img/69/505707755e6b003d90cdb07e61914a.jpg)
[deep learning] the credit card fraud anomaly detection based on the deep learning autoencoder is very effective

3. 网页开发工具 VS Code

In June, 2022, China Database ranking: tidb made a comeback to win the crown, and Dameng was dormant and won the flowers in May

H. 265 introduction to coding principles

学籍管理系统

apache atlas 快速入门

13、 System call and shell (freesanding shell, terminal and job control)
随机推荐
Dynaslam ii: carefully coupled multi object tracking and slam
'setbackgrounddrawable() 'is deprecated, setbackgrounddrawable is obsolete
WTO MC12 restart agenda focuses on global economic recovery
【深度学习】基于深度学习Autoencoder的信用卡欺诈异常检测,效果非常牛逼
【FLinlk】Flink小坑之kerberos动态认证
WT2003H4-16S 语音芯片按键录音及播放应用解析
Z-Wave ecosystem status report in 2022
【Multisim仿真】差分放大电路2
[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
3. web page development tool vs Code
How does the API detect security configuration errors?
不吐不快
buuctf [Jupyter]notebook-rce
Vdo-slam: a visual dynamic object aware slam system paper reading
Yet Another Palindrome Partitioning
buuctf [Discuz]wooyun-2010-080723
数码管驱动芯片+语音芯片的应用场景介绍,WT588E02B-24SS
Code free may event Microsoft low code matrix update; Multiple industry reports released
MySQL数据库(26):视图 view
Error:top-left corner pixel must be either opaque white or transparent.