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

网站项目建设策划书流程西安网站建设网络推广

网站项目建设策划书流程,西安网站建设网络推广,科技有限公司都是做什么的,建设一个商城网站大概多少钱程序示例精选 VSQtC旅游景区地图导航 如需安装运行环境或远程调试&#xff0c;见文章底部个人QQ名片&#xff0c;由专业技术人员远程协助&#xff01; 前言 这篇博客针对<<VSQtC旅游景区地图导航>>编写代码&#xff0c;代码整洁&#xff0c;规则&#xff0c;易读。…

  程序示例精选

VS+Qt+C++旅游景区地图导航

如需安装运行环境或远程调试,见文章底部个人QQ名片,由专业技术人员远程协助!

前言

这篇博客针对<<VS+Qt+C++旅游景区地图导航>>编写代码,代码整洁,规则,易读。 学习与应用推荐首选。


文章目录

一、所需工具软件

二、使用步骤

        1. 引入库

        2. 代码实现

        3. 运行结果

三、在线协助

一、所需工具软件

1. VS, Qt

2. C++

二、使用步骤

1.引入库

#include "MainWindow.h"
#include<iostream>#include<qDebug>
#include<QFile>
#include <QBitmap>
#include <QPainter>
#include<QImage>
#include<QPixmap>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QPointF>
#include <QLineF>

2. 代码实现

代码如下:

.h*************************************
#pragma once#include <QtWidgets/QMainWindow>
#include "ui_MainWindow.h"#include <qDebug>class MainWindow : public QMainWindow
{Q_OBJECTpublic:MainWindow(QWidget *parent = Q_NULLPTR);protected:private:Ui::MainWindowClass ui;private slots:void OnSearch();void mapBackGround();void initStyleSheetTitle();void paintEvent(QPaintEvent* event);void initStyleSheetMapButton();void initStyleSheetButton();void initStyleSheetLabel();};.cpp********************************
MainWindow::MainWindow(QWidget *parent): QMainWindow(parent)
{ui.setupUi(this);QObject::connect(ui.pushButton_7, SIGNAL(clicked()), this, SLOT(OnSearch()));ui.frame->setFrameStyle(QFrame::NoFrame);ui.frame_3->setFrameStyle(QFrame::NoFrame);
}void MainWindow::mouseDoubleClickEvent(QMouseEvent* event)
{int x = pos.x();int y = pos.y();qDebug() << "Double clicked at (" << x << "," << y << ")";
}void MainWindow::OnSearch()
{std::cout << "modelRun" << std::endl;QString startPos = ui.comboBox->currentText();QString endPos = ui.comboBox_2->currentText();qDebug() << "startPos: " << startPos;qDebug() << "endPos: " << endPos;if (startPos == QStringLiteral("孔子文化园") | startPos == QStringLiteral("碰碰车")){qDebug() << QStringLiteral("孔子文化园") ;// 添加两个点坐标QPointF point1(165, 228);QPointF point2(271, 218);QPointF point3(310, 95);// 设置GraphicsView的大小ui.graphicsView->setRenderHint(QPainter::Antialiasing); // 设置抗锯齿渲染ui.graphicsView->setAlignment(Qt::AlignLeft | Qt::AlignTop); // 设置对齐方式ui.graphicsView->setResizeAnchor(QGraphicsView::AnchorUnderMouse); // 设置缩放锚点为鼠标位置ui.graphicsView->setDragMode(QGraphicsView::ScrollHandDrag); // 设置拖拽模式为滚动手势拖拽QPen pen(Qt::red); // 设置线条颜色为红色pen.setWidth(2);   // 设置线宽为2// 在graphicsView_2的坐标系下绘制圆int radius = 25;int borderWidth = 5; // 壁厚pen.setWidth(borderWidth); // 设置线宽scene->addEllipse(point1.x() - (radius - borderWidth),point1.y() - (radius - borderWidth),(radius - borderWidth) * 2,(radius - borderWidth) * 2,pen, QBrush(Qt::NoBrush));scene->addEllipse(point2.x() - (radius - borderWidth),point2.y() - (radius - borderWidth),(radius - borderWidth) * 2,(radius - borderWidth) * 2,pen, QBrush(Qt::NoBrush));scene->addEllipse(point3.x() - (radius - borderWidth),point3.y() - (radius - borderWidth),(radius - borderWidth) * 2,(radius - borderWidth) * 2,pen, QBrush(Qt::NoBrush));// 绘制线段scene->addLine(QLineF(point1, point2), pen);scene->addLine(QLineF(point2, point3), pen);}}void MainWindow::initStyleSheetTitle()
{QString cssStr = "./style/style_label_title.css";QFile file(cssStr);if (file.open(QFile::ReadOnly)){QString qss = QLatin1String(file.readAll());ui.label->setStyleSheet(qss);file.close();}else {qDebug() << "Failed to open CSS file: " << file.fileName();}}void MainWindow::mapBackGround()
{QString cssStr = "./style/style_frame_mapBG.css";QString qss;QFile file(cssStr);if (file.open(QFile::ReadOnly)){qss = QLatin1String(file.readAll());//ui.frame_2->setStyleSheet(qss);file.close();}else {qDebug() << "Failed to open CSS file: " << file.fileName();}
}void MainWindow::initStyleSheetButton()
{QString cssStr = "./style/style_pushButton.css";QString qss;QFile file(cssStr);if (file.open(QFile::ReadOnly)){qss = QLatin1String(file.readAll());ui.pushButton_7->setStyleSheet(qss);file.close();}else {qDebug() << "Failed to open CSS file: " << file.fileName();}}void MainWindow::initStyleSheetMapButton()
{QString cssStr = "./style/style_pushButton_map.css";QString qss;QFile file(cssStr);if (file.open(QFile::ReadOnly)){qss = QLatin1String(file.readAll());//ui.pushButton_3->setStyleSheet(qss);//ui.pushButton_4->setStyleSheet(qss);//ui.pushButton_5->setStyleSheet(qss);//ui.pushButton_6->setStyleSheet(qss);file.close();}else {qDebug() << "Failed to open CSS file: " << file.fileName();}}

3. 运行结果

三、在线协助:

如需安装运行环境或远程调试,见文章底部个人 QQ 名片,由专业技术人员远程协助!
1)远程安装运行环境,代码调试
2)Qt, C++, Python入门指导
3)界面美化
4)软件制作

当前文章连接:Python+Qt桌面端与网页端人工客服沟通工具_alicema1111的博客-CSDN博客

博主推荐文章:python人脸识别统计人数qt窗体-CSDN博客

博主推荐文章:Python Yolov5火焰烟雾识别源码分享-CSDN博客

                         Python OpenCV识别行人入口进出人数统计_python识别人数-CSDN博客

个人博客主页:alicema1111的博客_CSDN博客-Python,C++,网页领域博主

博主所有文章点这里alicema1111的博客_CSDN博客-Python,C++,网页领域博主

http://www.tj-hxxt.cn/news/14302.html

相关文章:

  • 网站建设方案书腾讯企点账户中心
  • 爱站网seo查询上海网络推广营销策划方案
  • 聊城网站建设网络广告营销对应案例
  • 海南做网站公司哪家好开网店怎么开 新手无货源
  • 营销型网站建设成为企业发展新趋势华为手机网络营销策划方案
  • 沈阳市网站建设报价百度灰色关键词代发
  • 北京网站建设qq群产品推广方案ppt模板
  • 网站后台收入怎么做会计分录附近广告公司联系电话
  • 产品展示网站含后台网站模板下载恩施seo整站优化哪家好
  • 刘素云网站脱孝怎样做seo网站推广软件
  • 潮州南桥市场中国建设银行网站优化关键词怎么做
  • 真人做爰网站在百度上打广告找谁
  • 怎么样做一家卖东西的网站百度竞价推广出价技巧
  • 郴州市人力资源考试网石家庄seo外包公司
  • 免费建博客网站百度登录页
  • 社交网站设计seo chinaz
  • 做音乐网站要求神童预言新冠2023结束
  • 上海做网站优化公司seo排名app
  • 青岛网站建站公司网络竞价
  • 长沙专业做网站公司哪家好小璇seo优化网站
  • 域名建网站公司网站优化设计的基础是网站基本要素及每个细节的优化
  • net大规模网站开发视频产品网络推广方式
  • 郑州做网站优化外包青岛网站制作设计
  • 万网可以花钱做网站搜索关键词排名一般按照什么收费
  • 个体工商户可以做网站吗外包公司
  • 集团门户网站建设费用科目谷歌seo是指什么意思
  • 佛山网页网站设计网课培训机构排名前十
  • 西部数码网站管理助手搭建织梦百度在线人工客服
  • 做名片模板网站网络推广教程
  • 做桌面端还是网站佛山seo教程