#include "tmp.h"
Tmp::Tmp(QGraphicsItem *parent)
:QGraphicsProxyWidget(parent)
{
m_widget = new QWidget;
m_button = new QPushButton(m_widget);
m_label = new QLabel(m_widget);
m_button->setText("PushButton");
m_button->setGeometry(10, 10, 100, 30);
m_label->setGeometry(10, 40, 200, 30);
QObject::connect(m_button, SIGNAL(clicked()), this, SIGNAL(sendOnButton()));
setWidget(m_widget);
}
Tmp::~Tmp()
{
delete m_widget;
}
void Tmp::changeText(const QString &text)
{
m_label->setText(text);
qDebug("call Widget::changeText");
}
没有合适的资源?快使用搜索试试~ 我知道了~
QML和QT对象之间的访问
共7个文件
cpp:2个
pro:1个
user:1个
3星 · 超过75%的资源 需积分: 50 54 下载量 132 浏览量
2011-05-08
22:28:50
上传
评论
收藏 3KB RAR 举报
温馨提示
QT编程中,通过Quick编写QML语言,在让QT暴露对象给QML访问。
资源推荐
资源详情
资源评论
收起资源包目录
qmlandc4.rar (7个子文件)
qmlandc4
main.cpp 483B
tmp.h 484B
tmp.cpp 605B
main.qml 539B
main.qrc 87B
qmlandc4.pro 435B
qmlandc4.pro.user 13KB
共 7 条
- 1
资源评论
- 这个懒人2021-03-31资料太简单啦
- 起点06152014-04-14资料太简单啦
- selina68742012-02-10资料太简单啦,看了之后还是一头雾水
- jiangnandeyuqiuerduo2012-09-06只是个工程文件 太简单了 有没有进阶的 +1
- 延卿2013-08-22只是个工程文件 太简单了 有没有进阶的
hulongxian
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功