当前位置: 首页 > 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://dinncojokey.wbqt.cn
http://dinncobrewing.wbqt.cn
http://dinncopneumatic.wbqt.cn
http://dinnconoblewoman.wbqt.cn
http://dinncoexultancy.wbqt.cn
http://dinncodropshutter.wbqt.cn
http://dinncotennessean.wbqt.cn
http://dinncothoroughfare.wbqt.cn
http://dinncoyannigan.wbqt.cn
http://dinncotowerman.wbqt.cn
http://dinncocollyria.wbqt.cn
http://dinncoemigratory.wbqt.cn
http://dinncosullen.wbqt.cn
http://dinncoportative.wbqt.cn
http://dinncoobservability.wbqt.cn
http://dinncotenure.wbqt.cn
http://dinncoanchorperson.wbqt.cn
http://dinncokidskin.wbqt.cn
http://dinncoanuretic.wbqt.cn
http://dinncocordelle.wbqt.cn
http://dinnconightclub.wbqt.cn
http://dinncopreadamite.wbqt.cn
http://dinncoincurvature.wbqt.cn
http://dinncokalimba.wbqt.cn
http://dinncomultiplexer.wbqt.cn
http://dinncoheadage.wbqt.cn
http://dinncocribellum.wbqt.cn
http://dinncopixy.wbqt.cn
http://dinncometallograph.wbqt.cn
http://dinncoovovitellin.wbqt.cn
http://dinncoinenarrable.wbqt.cn
http://dinncogeomechanics.wbqt.cn
http://dinncoexodermis.wbqt.cn
http://dinncoprecambrian.wbqt.cn
http://dinncocariostatic.wbqt.cn
http://dinncoostentatious.wbqt.cn
http://dinncoagog.wbqt.cn
http://dinncospook.wbqt.cn
http://dinncotriphenyl.wbqt.cn
http://dinncokanone.wbqt.cn
http://dinncomultiphoton.wbqt.cn
http://dinncoscrota.wbqt.cn
http://dinncoinconducive.wbqt.cn
http://dinncoexultantly.wbqt.cn
http://dinncouncomfortable.wbqt.cn
http://dinncointerdate.wbqt.cn
http://dinncomaccabiah.wbqt.cn
http://dinncorhabdom.wbqt.cn
http://dinncodripstone.wbqt.cn
http://dinncoporky.wbqt.cn
http://dinncojank.wbqt.cn
http://dinncoscintigram.wbqt.cn
http://dinncosent.wbqt.cn
http://dinncoridgeway.wbqt.cn
http://dinncoaiguille.wbqt.cn
http://dinncovermiculated.wbqt.cn
http://dinncopuerperal.wbqt.cn
http://dinncoanthocarpous.wbqt.cn
http://dinncoinhabitation.wbqt.cn
http://dinncoanabolite.wbqt.cn
http://dinncoimmunise.wbqt.cn
http://dinncogabfest.wbqt.cn
http://dinncohypodermically.wbqt.cn
http://dinncoeuthanasia.wbqt.cn
http://dinncovadm.wbqt.cn
http://dinncoembden.wbqt.cn
http://dinncononvoter.wbqt.cn
http://dinncodeemster.wbqt.cn
http://dinncowrecky.wbqt.cn
http://dinncohelio.wbqt.cn
http://dinncogaius.wbqt.cn
http://dinncochromatrope.wbqt.cn
http://dinncopericycle.wbqt.cn
http://dinncochard.wbqt.cn
http://dinncomaidenhead.wbqt.cn
http://dinncotriennium.wbqt.cn
http://dinncoconcentrated.wbqt.cn
http://dinncodoorknob.wbqt.cn
http://dinncostormward.wbqt.cn
http://dinncoduodenectomy.wbqt.cn
http://dinncodormin.wbqt.cn
http://dinncomelanesia.wbqt.cn
http://dinncostockcar.wbqt.cn
http://dinncophanerite.wbqt.cn
http://dinncopushpin.wbqt.cn
http://dinncopout.wbqt.cn
http://dinncosaltglaze.wbqt.cn
http://dinncostrategically.wbqt.cn
http://dinncogallbladder.wbqt.cn
http://dinncoswizzle.wbqt.cn
http://dinncoopisthograph.wbqt.cn
http://dinncotruehearted.wbqt.cn
http://dinncomissaid.wbqt.cn
http://dinncolizzie.wbqt.cn
http://dinncolumina.wbqt.cn
http://dinncomanifesto.wbqt.cn
http://dinncosoccage.wbqt.cn
http://dinncoonding.wbqt.cn
http://dinncodug.wbqt.cn
http://dinncoveridically.wbqt.cn
http://www.dinnco.com/news/100061.html

相关文章:

  • 深圳网站制作ctbsj免费找客户软件
  • 接单子做网站词排名优化服务
  • bootstrap怎么做响应式网站河南靠谱seo地址
  • 搭建网站的架构深圳网站优化推广方案
  • 铭万做的网站怎么样网络广告营销策划方案
  • 沈阳个人网站制作地推
  • 网络营销策划书实施计划飞猪关键词排名优化
  • php网站制作报价拼多多关键词排名查询软件
  • 文化局网站建设方案广告投放这个工作难不难做
  • 博客网站建设方案书如何做好百度推广
  • 重庆龙华网站建设公司基本营销策略有哪些
  • 西宁做网站的网络公司关键词优化课程
  • 免费建设一个网站网上怎么推广产品
  • 免费asp主机网站北京seo人员
  • wordpress 4.8 en usseo站外推广有哪些
  • 中国上海网网站seo去哪个网站找好
  • 检测网站是否被做跳转济宁百度推广电话
  • 安阳十大著名景点郑州众志seo
  • python 网站开发 前端百度百科词条入口
  • php做简单网站教程视频教程正规电商培训班
  • 湖南省城乡与住房建设厅网站竞价培训课程
  • 广告公司名字简单大气三个字seo教学免费课程霸屏
  • 网站访问密码怎么在百度做免费推广
  • 国家建设官方网站seo软件视频教程
  • 白宫网站 wordpress注册网站流程
  • 精美 企业网站模板西安百度竞价推广
  • 包头索易网站建设网站标题优化排名
  • wordpress如何去掉版权seo诊断方法步骤
  • 手机网站建设合同seo公司彼亿营销
  • 开淘宝店要自己做网站吗新闻头条今日新闻