91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

此實用例子參考QT代碼示例,經過自己改編及測試:實現了C++與JS的相互調用及發送消息。

資源截圖

代碼片段和文件信息

/****************************************************************************
**
**?Copyright?(C)?2015?The?Qt?Company?Ltd.
**?Contact:?http://www.qt.io/licensing/
**
**?This?file?is?part?of?the?demonstration?applications?of?the?Qt?Toolkit.
**
**?$QT_BEGIN_LICENSE:LGPL$
**?Commercial?License?Usage
**?Licensees?holding?valid?commercial?Qt?licenses?may?use?this?file?in
**?accordance?with?the?commercial?license?agreement?provided?with?the
**?Software?or?alternatively?in?accordance?with?the?terms?contained?in
**?a?written?agreement?between?you?and?The?Qt?Company.?For?licensing?terms
**?and?conditions?see?http://www.qt.io/terms-conditions.?For?further
**?information?use?the?contact?form?at?http://www.qt.io/contact-us.
**
**?GNU?Lesser?General?Public?License?Usage
**?Alternatively?this?file?may?be?used?under?the?terms?of?the?GNU?Lesser
**?General?Public?License?version?2.1?as?published?by?the?Free?Software
**?Foundation?and?appearing?in?the?file?LICENSE.LGPL?included?in?the
**?packaging?of?this?file.?Please?review?the?following?information?to
**?ensure?the?GNU?Lesser?General?Public?License?version?2.1?requirements
**?will?be?met:?http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
**?As?a?special?exception?The?Qt?Company?gives?you?certain?additional
**?rights.?These?rights?are?described?in?The?Qt?Company?LGPL?Exception
**?version?1.1?included?in?the?file?LGPL_EXCEPTION.txt?in?this?package.
**
**?GNU?General?Public?License?Usage
**?Alternatively?this?file?may?be?used?under?the?terms?of?the?GNU
**?General?Public?License?version?3.0?as?published?by?the?Free?Software
**?Foundation?and?appearing?in?the?file?LICENSE.GPL?included?in?the
**?packaging?of?this?file.?Please?review?the?following?information?to
**?ensure?the?GNU?General?Public?License?version?3.0?requirements?will?be
**?met:?http://www.gnu.org/copyleft/gpl.html.
**
**
**?$QT_END_LICENSE$
**
****************************************************************************/

#include?“document.h“


void?Document::setSendTextText(const?QString?&text)
{
????s_text?=?text;
????emit?sendText(s_text);
}

void?Document::displayMessage(const?QString?&message)
{
??????mainUi->editor->appendPlainText(message);
}

/*!
????This?slot?is?invoked?from?the?HTML?client?side?and?the?text?displayed?on?the?server?side.
*/
void?Document::receiveText(const?QString?&r_text)
{
????displayMessage(Qobject::tr(“Received?message:?%1“).arg(r_text));
}

void?Document::setUi(Ui::MainWidget?*ui)
{
????mainUi?=?ui;
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????2483??2016-01-12?09:13??document.cpp
?????文件????????2640??2016-01-12?09:12??document.h
?????文件?????????421??2016-01-12?02:04??htmlpage.cpp
?????文件????????2164??2016-01-12?08:01??index.html
?????文件?????????206??2016-01-12?03:13??main.cpp
?????文件????????1015??2017-10-10?09:37??mainwidget.cpp
?????文件?????????513??2016-01-12?09:01??mainwidget.h
?????文件????????2129??2016-01-12?07:58??mainwidget.ui
?????文件???????24491??2016-01-12?03:25??Makefile
?????文件???????78909??2016-01-12?03:25??Makefile.Debug
?????文件???????78942??2016-01-12?03:25??Makefile.Release
?????文件????????2378??2017-10-09?13:29??previewpage.cpp
?????文件????????2309??2015-12-14?10:27??previewpage.h
?????文件???????14837??2015-12-14?10:27??qwebchannel.js
?????文件????????4578??2016-01-12?08:33??ui_mainwidget.h
?????文件?????????530??2016-01-12?03:24??webchanneltest.pro
?????文件???????23945??2017-10-11?19:46??webchanneltest.pro.user
?????文件???????23422??2016-01-12?09:14??webchanneltest.pro.user.e55cfe6
?????文件?????????131??2016-01-12?01:32??webchanneltest.qrc

評論

共有 條評論