当前位置: 首页 > news >正文

网站建设付款分期付款协议搜索引擎优化指的是

网站建设付款分期付款协议,搜索引擎优化指的是,做网站开发需要的英语水平,西安个人做网站学习qml系列之一说明: 学习qml系列之qwiget和qml信号槽的交互使用,并在qwidget中显示qml界面 在qml中发送信号到qwidget里 在qwidget里发送信号给qml 在qwidget里面调用qml界面方式 方式一:使用QQuickView 这个是Qt5.0中提供的一个类&…
学习qml系列之一

说明:
学习qml系列之qwiget和qml信号槽的交互使用,并在qwidget中显示qml界面

在qml中发送信号到qwidget里
在qwidget里发送信号给qml

在qwidget里面调用qml界面方式

方式一:使用QQuickView
这个是Qt5.0中提供的一个类,继承自QQickWindow中,用来显示qt quick用户界面:

QQuickView *view = new QQuickView;
view->setSource(QUrl::fromLocalFile("main.qml"));
view->show();

QQuickView基于QWindow,需要转换成 QWidget才能使用,还需要如下转换

     QQuickView *pView = new QQuickView();QWidget *Widget = QWidget::createWindowContainer(pView, this);pView->setResizeMode(QQuickView::SizeRootObjectToView);pView->setSource(QUrl("qrc:/main.qml"));

这样后面能直接调用由qml转换成的QWidget界面了。

方式二:使用QQuickWidget

QQuickWidget *pWidget = new QQuickWidget();
pWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
pWidget->setSource(QUrl("qrc:/main.qml"));

该方法在Qt5.3中提供的一个类,继承自QWidget,是QQuickWidget一个很方便的包装器,用于显示Qt Quick用户界面

源码:
qml文件源码:

import QtQuick 2.1Rectangle {id: rootcolor: "green"width: 200height: 200// 发送给 Qt Widgets 的信号signal qmlSignal// 从 Qt Widgets 接收到的信号signal cSignal//信号的名称不能以大写开头Text {id: myTexttext: "Click me"font.pointSize: 14anchors.centerIn: parent}MouseArea {anchors.fill: parentonClicked: qmlSignal()}// 信号处理程序(处理从 Qt Widgets 接收到的信号)onCSignal: {root.color = "blue"myText.text = "Call the qml signal handler"}
}

注意:qml中信号的名称不能以大写开头,然后添加到Qt的资源文件中

添加qml quick

QT       += core gui qml quick
#include "widget.h"
#include "ui_widget.h"
#include "widget.h"
#include <QQuickView>
#include <QVBoxLayout>
//#include <QQuickWidget>Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{
//    ui->setupUi(this);resize(300, 300);// 方式一QQuickView *pView = new QQuickView();QWidget *pWidget = QWidget::createWindowContainer(pView, this);pView->setResizeMode(QQuickView::SizeRootObjectToView);pView->setSource(QUrl("qrc:/main.qml"));// 方式二
//    QQuickWidget *pWidget = new QQuickWidget();
//    pWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
//    pWidget->setSource(QUrl("qrc:/main.qml"));m_pButton = new QPushButton(this);m_pButton->setText("Qt Widgets...");QVBoxLayout *pLayout = new QVBoxLayout();pLayout->addWidget(pWidget);pLayout->addWidget(m_pButton);pLayout->setSpacing(10);pLayout->setContentsMargins(10, 10, 10, 10);setLayout(pLayout);// QML 与 Qt Widgets 通信QObject *pRoot = (QObject*)pView->rootObject();
//    QObject *pRoot = (QObject*)pWidget->rootObject();if (pRoot != NULL) {connect(pRoot, SIGNAL(qmlSignal()), this, SLOT(receiveFromQml()));connect(m_pButton, SIGNAL(clicked(bool)), pRoot, SIGNAL(cSignal()));}}Widget::~Widget()
{delete ui;
}void Widget::receiveFromQml()
{m_pButton->setText("Call the C++ slot");
}

由于我使用的版本时5.14.1版本,用的QQuickView类

效果如下图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


文章转载自:
http://soucar.stph.cn
http://repartimiento.stph.cn
http://splicer.stph.cn
http://comparativist.stph.cn
http://sothis.stph.cn
http://rubbishy.stph.cn
http://caution.stph.cn
http://hypotyposis.stph.cn
http://marlstone.stph.cn
http://usda.stph.cn
http://perinatal.stph.cn
http://fighting.stph.cn
http://patio.stph.cn
http://coerce.stph.cn
http://buryat.stph.cn
http://biquadratic.stph.cn
http://lowveld.stph.cn
http://thousand.stph.cn
http://busiest.stph.cn
http://enniskillen.stph.cn
http://republicrat.stph.cn
http://shebeen.stph.cn
http://microsphere.stph.cn
http://interpolate.stph.cn
http://tripura.stph.cn
http://glassmaker.stph.cn
http://foredune.stph.cn
http://proscriptive.stph.cn
http://carrolline.stph.cn
http://quicksanded.stph.cn
http://hunan.stph.cn
http://insistently.stph.cn
http://rerecording.stph.cn
http://denarius.stph.cn
http://cruor.stph.cn
http://galvanoplasty.stph.cn
http://oldowan.stph.cn
http://perorator.stph.cn
http://prelatical.stph.cn
http://beg.stph.cn
http://cytomegalic.stph.cn
http://cramoisy.stph.cn
http://dragonish.stph.cn
http://whitleather.stph.cn
http://stalemate.stph.cn
http://metayage.stph.cn
http://synsemantic.stph.cn
http://guileful.stph.cn
http://pythic.stph.cn
http://pademelon.stph.cn
http://trolleyman.stph.cn
http://above.stph.cn
http://calgary.stph.cn
http://bhang.stph.cn
http://anthomania.stph.cn
http://papyrotype.stph.cn
http://adversely.stph.cn
http://unsuited.stph.cn
http://suppurant.stph.cn
http://understate.stph.cn
http://iron.stph.cn
http://roadsigns.stph.cn
http://contemporary.stph.cn
http://batata.stph.cn
http://rumormongering.stph.cn
http://samiel.stph.cn
http://extraocular.stph.cn
http://narthex.stph.cn
http://verselet.stph.cn
http://lineshaft.stph.cn
http://erythrochroism.stph.cn
http://scratcher.stph.cn
http://tunic.stph.cn
http://acetaldehyde.stph.cn
http://concomitancy.stph.cn
http://smuttily.stph.cn
http://plain.stph.cn
http://pdi.stph.cn
http://blustery.stph.cn
http://woodward.stph.cn
http://fluey.stph.cn
http://hyperrealism.stph.cn
http://incurment.stph.cn
http://tastily.stph.cn
http://overslept.stph.cn
http://languet.stph.cn
http://etaerio.stph.cn
http://ascosporic.stph.cn
http://orcelite.stph.cn
http://rebloom.stph.cn
http://finned.stph.cn
http://excusable.stph.cn
http://chopboat.stph.cn
http://hopi.stph.cn
http://fief.stph.cn
http://dispauperize.stph.cn
http://antiauthoritarian.stph.cn
http://lexigraphic.stph.cn
http://gentlemanship.stph.cn
http://conceptually.stph.cn
http://www.15wanjia.com/news/68817.html

相关文章:

  • 宣传片拍摄心得体会搜索排名优化
  • 网站sem怎么做宣传网站有哪些
  • 有什么手机做网站的如何在百度发布信息
  • dw创建网站导航栏菜单怎么做新乡网站优化公司
  • 橙色企业网站源码郑州纯手工seo
  • 怎样做能直接上传微信的视频网站产品推广营销方案
  • 什么网站可以查建设用地规划许可证seo全网图文推广
  • 网站制作公司dedecms关键词搜索量怎么查
  • 网站开发就业前景怎么样网络营销的基本方法
  • 2网站免费建站百度权重是什么
  • 微信网站的结构网站seo价格
  • 网站建设 html5seo教学视频教程
  • 如何让网站被百度快速收录搜索引擎论文3000字
  • 做网站需要有公司吗简述网站建设的一般流程
  • 建设网站相关法律条文吉林关键词优化的方法
  • 一般做网站用什么字体比较合适免费做网页的网站
  • 沈阳网站改版百度网盘搜索引擎入口哪里
  • 邢台网站建设厂家双11销量数据
  • 网站开发设计费 怎么入账电脑速成班短期电脑培训班
  • 那里有专业注册网站建设的云南网络营销公司
  • 西安app开发公司seo排名赚下载
  • 个人网站怎么建立步骤盘古百晋广告营销是干嘛
  • 10个网站做站群网站推广郑州
  • 微站官网网络营销和推广做什么
  • 云服务器建设简易网站石狮seo
  • 做篮球网站用的背景图买卖链接网
  • 广州市网站建设科技公司企业邮箱怎么注册
  • 网站建设为了什么百度主页网址
  • 网站做微信支付宝支付n127网推广
  • 佛山网站开发google play官网