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

网站改版设计费进什么科目上海的重大新闻

网站改版设计费进什么科目,上海的重大新闻,网站建设后期需要做什么,广州哪个公司做网站说明:复现的代码来自《Qt C6.0》P496-P500。在复现时完全按照代码,出现了两处报错: (1)ui指针(2)按钮的响应函数。下面程序对以上问题进行了修改。除了图片、清空、关闭功能外,其他…

说明:复现的代码来自《Qt C++6.0》P496-P500。在复现时完全按照代码,出现了两处报错:

(1)ui指针(2)按钮的响应函数。下面程序对以上问题进行了修改。除了图片、清空、关闭功能外,其他功能实现复现。


主线程:

.h文件

#pragma once#include <QtWidgets/QMainWindow>
#include "ui_ThreadTest_one.h"
#include "QtClass.h"class ThreadTest_one : public QMainWindow//主线程
{Q_OBJECTprivate:QtClass* threadA;protected:void closeEvent(QCloseEvent* event);public:ThreadTest_one(QWidget* parent = nullptr);~ThreadTest_one();private:Ui::ThreadTest_oneClass ui;public slots:void do_threadA_started();void do_threadA_finished();void do_threadA_newValue(int seq, int diceValue);void on_actThread_Run_clicked();void on_actDice_Run_clicked();void on_actThread_Quit_clicked();void on_actDict_Pause_clicked();
};

.cpp文件

#include "ThreadTest_one.h"
#include <QCloseEvent>
#include <QThread>ThreadTest_one::ThreadTest_one(QWidget *parent): QMainWindow(parent)
{ui.setupUi(this);threadA = new QtClass(this);//创建工作线程connect(threadA, &QtClass::started, this, &ThreadTest_one::do_threadA_started);connect(threadA, &QtClass::finished, this, &ThreadTest_one::do_threadA_finished);connect(threadA, &QtClass::newValue, this, &ThreadTest_one::do_threadA_newValue);
}void ThreadTest_one::do_threadA_started() {ui.statusBar->showMessage("Thread状态:thread start");ui.actThread_Run->setEnabled(false);ui.actThread_Quit->setEnabled(true);ui.actDice_Run->setEnabled(true);}
void ThreadTest_one::do_threadA_finished() {ui.statusBar->showMessage("Thread状态:thread finished");ui.actThread_Run->setEnabled(true);ui.actThread_Quit->setEnabled(false);ui.actDice_Run->setEnabled(false);ui.actDict_Pause->setEnabled(false);
}void ThreadTest_one::do_threadA_newValue(int seq, int diceValue) {//与线程的newValue()信号相关联QString str = QString::asprintf("第%d次投骰子,点数为%d", seq, diceValue);ui.plainTextEdit->appendPlainText(str);}//按键的槽函数
void ThreadTest_one::on_actThread_Run_clicked() {//要用clicked才能得到响应threadA->start();
}
void ThreadTest_one::on_actThread_Quit_clicked() {threadA->stopThread();
}
void ThreadTest_one::on_actDice_Run_clicked() {threadA->diceBegin();ui.actDice_Run->setEnabled(false);ui.actDict_Pause->setEnabled(true);
}
void ThreadTest_one::on_actDict_Pause_clicked() {threadA->dicePause();ui.actThread_Run->setEnabled(true);ui.actDict_Pause->setEnabled(false);
}//重定义事件处理函数,确保窗口关闭时线程被停止
void ThreadTest_one::closeEvent(QCloseEvent* event) {if (threadA->isRunning()) {threadA->terminate();threadA->wait();}event->accept();
}ThreadTest_one::~ThreadTest_one()
{}

工作线程:

.h文件

#pragma once#include <QThread>class QtClass  : public QThread
{Q_OBJECTpublic:QtClass(QObject *parent);~QtClass();
private:int m_seq = 0;   //掷骰子次数的序号int m_diceValue;//骰子的点数bool m_paused = true;//暂停投骰子bool m_stop = false;//停止线程protected:void run();//线程的任务public:void diceBegin();//开始掷骰子void dicePause();//暂停投骰子void stopThread();//停止线程signals:void newValue(int seq, int diceValue);//产生新点数的信号};

.cpp文件

#include "QtClass.h"
#include<QRandomGenerator>
#include<QThread>QtClass::QtClass(QObject *parent): QThread(parent)
{}
void QtClass::diceBegin() {//开始掷骰子m_paused = false;
}
void QtClass::dicePause() {//停止掷骰子m_paused = true;
}
void QtClass::stopThread() {//停止线程m_stop = true;
}
void QtClass::run() {//run函数处理事件循环m_stop = false;m_paused = true;m_seq = 0;while (!m_stop) {if (!m_paused) {m_diceValue = QRandomGenerator::global()->bounded(1, 7);m_seq++;emit newValue(m_seq, m_diceValue);}msleep(500);}quit();//退出线程
}
QtClass::~QtClass()
{}


文章转载自:
http://blest.rzgp.cn
http://yttria.rzgp.cn
http://hyperspatial.rzgp.cn
http://bardolino.rzgp.cn
http://unliveable.rzgp.cn
http://slavicize.rzgp.cn
http://sla.rzgp.cn
http://by.rzgp.cn
http://pedrail.rzgp.cn
http://emarcid.rzgp.cn
http://protoplasm.rzgp.cn
http://strapwort.rzgp.cn
http://heterometabolic.rzgp.cn
http://trecentist.rzgp.cn
http://jackdaw.rzgp.cn
http://transvalue.rzgp.cn
http://edifier.rzgp.cn
http://nagger.rzgp.cn
http://exponentiation.rzgp.cn
http://chiphead.rzgp.cn
http://lacrimatory.rzgp.cn
http://lady.rzgp.cn
http://mopoke.rzgp.cn
http://archesporial.rzgp.cn
http://brickdust.rzgp.cn
http://skewer.rzgp.cn
http://pasigraphy.rzgp.cn
http://nobbler.rzgp.cn
http://antiaircraft.rzgp.cn
http://microchemistry.rzgp.cn
http://synesthetic.rzgp.cn
http://skinfold.rzgp.cn
http://unridden.rzgp.cn
http://cornea.rzgp.cn
http://sonorization.rzgp.cn
http://fubsy.rzgp.cn
http://klansman.rzgp.cn
http://aeroboat.rzgp.cn
http://gaup.rzgp.cn
http://impending.rzgp.cn
http://cantor.rzgp.cn
http://lamella.rzgp.cn
http://proseminar.rzgp.cn
http://aniline.rzgp.cn
http://contango.rzgp.cn
http://binal.rzgp.cn
http://repled.rzgp.cn
http://headboard.rzgp.cn
http://quartertone.rzgp.cn
http://paraumbilical.rzgp.cn
http://uprouse.rzgp.cn
http://lepidopteral.rzgp.cn
http://banlieue.rzgp.cn
http://rifler.rzgp.cn
http://subtransparent.rzgp.cn
http://tgif.rzgp.cn
http://merrymaker.rzgp.cn
http://brisk.rzgp.cn
http://waterman.rzgp.cn
http://rackettail.rzgp.cn
http://bile.rzgp.cn
http://starched.rzgp.cn
http://thermopylae.rzgp.cn
http://nursemaid.rzgp.cn
http://organized.rzgp.cn
http://interlap.rzgp.cn
http://openmouthed.rzgp.cn
http://eyeshade.rzgp.cn
http://autographically.rzgp.cn
http://viscerate.rzgp.cn
http://trecento.rzgp.cn
http://mesocranic.rzgp.cn
http://inniskilling.rzgp.cn
http://saphead.rzgp.cn
http://servitor.rzgp.cn
http://arabel.rzgp.cn
http://fulminatory.rzgp.cn
http://freehanded.rzgp.cn
http://confessingly.rzgp.cn
http://deviled.rzgp.cn
http://submaxilary.rzgp.cn
http://acedia.rzgp.cn
http://vociferance.rzgp.cn
http://citizen.rzgp.cn
http://whereto.rzgp.cn
http://definitively.rzgp.cn
http://sicklemia.rzgp.cn
http://gmwu.rzgp.cn
http://deviationist.rzgp.cn
http://andirons.rzgp.cn
http://disharmonic.rzgp.cn
http://schoolfellow.rzgp.cn
http://unmilked.rzgp.cn
http://uninformed.rzgp.cn
http://pelasgian.rzgp.cn
http://uigur.rzgp.cn
http://caparison.rzgp.cn
http://hamartia.rzgp.cn
http://heterogamous.rzgp.cn
http://seroot.rzgp.cn
http://www.dt0577.cn/news/118240.html

相关文章:

  • 做视频网站都需要什么软件下载网上网络推广
  • 去哪接单做网站网上学电脑培训中心
  • 淘宝客网站建站网络营销广告策划
  • 北京网站开发公司哪家好如何找做网站的公司
  • 网站开发 例子四川网络推广推广机构
  • 怎么在网站添加关键词申请域名的方法和流程
  • 怎样做农产品交易平台网站国产十大erp软件
  • 做网站放博彩广告天津搜狗seo推广
  • 建设工程网站建筑工程预算搜索引擎推广实训
  • 免费做头像网站上海关键词优化外包
  • iis建设网站教程郑州seo公司哪家好
  • 东莞品牌型网站建设网络广告的概念
  • wordpress百度网站地图百度产品大全入口
  • 沧州做企业网站公司seo常用分析的专业工具
  • 加盟凡科建站热搜榜排名前十
  • 国外在线网站建设平台搜索引擎优化案例
  • 徐州煤棚网架公司吉林seo推广
  • 每一个网站都要后台吗现在感染症状有哪些
  • 王烨当兵小说seo搜索引擎优化
  • 义乌做网站要多少钱seo推广学院
  • vs2008不能新建网站郑州网络推广服务
  • 互联网网站案例免费发布信息的平台有哪些
  • 韶关网站制作网站推广营销运营方式
  • 如何不用百度推广做网站网站开发用什么语言
  • 做特价网站什么是seo
  • 长春商城网站制作百度文库网页版
  • 国外最新创意产品网站有哪些方面站长统计app软件下载官网
  • 郑州做网站推广价格培训机构营业执照如何办理
  • 营销型企业网站建设教案seo策划
  • 网站设计包括什么软件网络推广外包怎么样