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

杭州网站推广大全怎样设计一个网页

杭州网站推广大全,怎样设计一个网页,nat123做视频网站,去年做那些网站能致富效果 在程序启动后,有时不会进入到工作页面,会进入到产品展示页面。 动画如下: 首页展示 页面操作 当不点击时,一秒自动刷新一次;当点击时,会自动跳转到对应页面;点击上一页、下一页、及跳转页…

效果

在程序启动后,有时不会进入到工作页面,会进入到产品展示页面。
动画如下:

首页展示

页面操作

  • 当不点击时,一秒自动刷新一次;
  • 当点击时,会自动跳转到对应页面;
  • 点击上一页、下一页、及跳转页数,会自动跳转。

UI设计

在这里插入图片描述

示例

注释在代码中,代码可运行。
.h

#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <QMainWindow>#include <QMap>
#include <QRadioButton>
#include <QButtonGroup>
namespace Ui {
class MainWindow;
}class MainWindow : public QMainWindow
{Q_OBJECTpublic:explicit MainWindow(QWidget *parent = nullptr);~MainWindow();private:Ui::MainWindow *ui;// 用于管理选择按钮QMap<int, QRadioButton*>    m_mapRadios;// 加入组QButtonGroup*               m_pBtnGroup;
};#endif // MAINWINDOW_H

.cpp

#include "mainwindow.h"
#include "ui_mainwindow.h"#include <QDebug>
#include <QLabel>
#include <QFont>#include <QTimer>MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);ui->pushButton->setStyleSheet("QPushButton {background-color: #eeeeee; outline: none;}");ui->pushButton_2->setStyleSheet("QPushButton {background-color: #eeeeee; outline: none;}");m_pBtnGroup = new QButtonGroup(this);ui->horizontalLayout->addStretch();// 循环创建按钮for (int var = 0; var < 5; ++var) {QRadioButton* pR = new QRadioButton(QString::number(var+1));m_mapRadios.insert(var, pR);ui->horizontalLayout->addWidget(pR);// 加入组m_pBtnGroup->addButton(pR, var);}ui->horizontalLayout->addStretch();// 加入mapm_mapRadios.value(m_mapRadios.keys().first())->setChecked(true);// 循环创建展示界面for (int var = 0; var < 5; ++var) {// 设置信息QLabel* pLabel = new QLabel(this);pLabel->setText(QString("第%1页面").arg(var+1));pLabel->resize(150, 100);QFont font = pLabel->font();font.setPointSize(23);font.setBold(true);pLabel->setFont(font);pLabel->setStyleSheet("QLabel{color:#ff0000;}");pLabel->move(width()/2, height()/2);ui->stackedWidget->insertWidget(ui->stackedWidget->count(), pLabel);}ui->stackedWidget->setCurrentIndex(0);// 根据点击按钮,同步展示页面connect(m_pBtnGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, [=](int nId){ui->stackedWidget->setCurrentIndex(nId);});// 定时器QTimer* pTimer = new QTimer(this);connect(pTimer, &QTimer::timeout, this, [=](){// 每一秒更新一次int nIndex = ui->stackedWidget->currentIndex();if(nIndex < 4){ui->stackedWidget->setCurrentIndex(nIndex+1);m_mapRadios.value(nIndex+1)->setChecked(true);}else{ui->stackedWidget->setCurrentIndex(0);m_mapRadios.value(0)->setChecked(true);}});connect(ui->pushButton, &QPushButton::clicked, this, [=](){int nIndex = ui->stackedWidget->currentIndex();if(nIndex > 0){ui->stackedWidget->setCurrentIndex(nIndex-1);m_mapRadios.value(nIndex-1)->setChecked(true);}});connect(ui->pushButton_2, &QPushButton::clicked, this, [=](){int nIndex = ui->stackedWidget->currentIndex();if(nIndex < 4){ui->stackedWidget->setCurrentIndex(nIndex+1);m_mapRadios.value(nIndex+1)->setChecked(true);}});pTimer->start(1000);}MainWindow::~MainWindow()
{delete ui;
}

结论

可将每页显示的改为产品或者介绍图,实现业务。

http://www.rdtb.cn/news/13358.html

相关文章:

  • 保定制作公司网站百度网盘下载app
  • 网站的建设及推广seo是什么意思怎么解决
  • 企业网站制作优化女排联赛排名
  • 宁波网站推广方法新闻发布会
  • 深圳城乡和住房建设局网站首页开鲁seo服务
  • 厦门企业自助建站广州seo外包
  • 网站网络营销外包长沙网站制作费用
  • b2c网站盈利模式促销方案
  • 信阳市商务局网站加油站建设公告什么是seo搜索引擎优化
  • 机械加工网名怎么起杭州seo培训
  • 杨凌企业网站开发网页制作模板
  • 网站建设专家怎么样网站目录扫描
  • 优化网页设计与网站开发论文网站推广模式
  • 网站配色方案乐事薯片软文推广
  • 优设网设计师导航玉溪seo
  • 能发朋友圈的网站建设语微信营销软件排行榜
  • 济南网站优化推广公司免费做网站
  • aspcms手机网站插件软件开发定制
  • asp.net制作网站开发网站首页模板
  • 做二手房网站有哪些资料seo顾问赚钱吗
  • 做游戏出租的网站好企业网站关键词优化
  • 织梦网站tag自定义插件提升关键词
  • wordpress数据库信息文件关键词优化哪个好
  • 培训网页制作机构谷歌seo服务商
  • python 做网站 代码会广州关于进一步优化疫情防控措施
  • 上海企业咨询公司广州专门做seo的公司
  • 做app的模板下载网站热门网站
  • 曹县 做网站的公司产品销售方案与营销策略
  • 重庆网站建设齐重庆零臻科技seo快速推广
  • 集团公司中英文网站模板seo sem是啥