我可以从 QLabel 读取值吗 [英] Can i read value from QLabel

查看:149
本文介绍了我可以从 QLabel 读取值吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在如何设置值(数字),但我可以在某个变量中读取该标签.如果无法阅读,我可以在哪些类似的小部件中放置价值并阅读它.任何帮助都将是 halpful 或有人有其他想法.也许像液晶数字,旋转框

I now how to set value(number) but can i read that label in some variable. if can't read, in which similar widgets can i put value and read it. Any help would be halpful or someone has an other idea. Maybe like LCD number, spin box

推荐答案

这样吗?

QString text = someLabel->text();

这篇关于我可以从 QLabel 读取值吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆