Qt 5.15.2 三维显示功能

Qt 5.15.2 三维显示功能

三维显示效果:
在这里插入图片描述

.pro项目文件

QT       += core gui opengl 3dcore 3drender 3dinput 3dextrasgreaterThan(QT_MAJOR_VERSION, 4): QT += widgetsCONFIG += c++17# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0SOURCES += \dialog_fbx2glb.cpp \dialog_osgb_to_b3dm.cpp \main.cpp \mainwindow.cpp \scene.cppHEADERS += \dialog_fbx2glb.h \dialog_osgb_to_b3dm.h \mainwindow.h \scene.hFORMS += \dialog_fbx2glb.ui \dialog_osgb_to_b3dm.ui \mainwindow.ui# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += targetDISTFILES += \images/211.ico \images/Clear2.ico \images/File.ico \images/Open.ico \images/opendir.png \images/openfile.png

Scene.h

#ifndef SCENE_H
#define SCENE_H#include <QObject>
#include <QWidget>#include <Qt3DCore/QEntity>
#include <Qt3DRender/QMesh>
#include <Qt3DRender/QCamera>
#include <Qt3DRender/QPointLight>
#include <Qt3DRender/QDirectionalLight>
#include <Qt3DCore/QTransform>
#include <Qt3DWindow>
#include <QOrbitCameraController>
#include <QFirstPersonCameraController>#include <Qt3DExtras/QForwardRenderer>
#include <Qt3DExtras/QPhongMaterial>
#include <Qt3DExtras/QTorusMesh>
#include <Qt3DExtras/QSphereMesh>#include <QKeyEvent>
#include <QTransform>
#include <QComponent>
#include <QQuaternion>
#include <QInputAspect>class Scene : public QObject
{Q_OBJECT
public:Qt3DCore::QEntity *rootEntity;Qt3DCore::QEntity *model;Qt3DCore::QTransform *transform;Qt3DRender::QDirectionalLight *light;//explicit Scene(Qt3DExtras::Qt3DWindow *, QObject *parent=nullptr);void SetupMesh(Qt3DRender::QMesh *mesh);void StartScene();void Camera(Qt3DExtras::Qt3DWindow *view);void setCameraCenterPoint(QVector3D center);Qt3DCore::QEntity* findChildQEntity(QString objName,Qt3DCore::QEntity* rootEnt);QVector3D computCenterPoint(Qt3DCore::QEntity* first);void initOrbitCameraController(Qt3DCore::QEntity *ent);void initFirstPersonCameraController(Qt3DCore::QEntity *ent);void init3d(Qt3DExtras::Qt3DWindow *view);void NewScene(Qt3DRender::QMesh *);void NewScene2(Qt3DRender::QMesh *mesh);void SetupTransformRoot(Qt3DCore::QEntity* model);void SetupTransform(Qt3DCore::QEntity* modelPrivate);void SetupMaterial(Qt3DCore::QEntity* model);void SetupLighting();//添加新实体Qt3DCore::QEntity* addMeshEntity(Qt3DRender::QMesh *mesh);Qt3DCore::QEntity* addEntity(Qt3DCore::QComponent *comp);//Qt3DCore::QEntity* addNewEntity();//void KeyControls(QKeyEvent *event);void wheelControls(QWheelEvent *event);void mouseControls(QMouseEvent *event);void mousePressControls(QMouseEvent *event);void paintALL();public slots:void LightXChanged(int angle);void LightYChanged(int angle);void LightZChanged(int angle);private:Qt3DExtras::Qt3DWindow *view;unsigned int backgroudColor=0x42f4bc;    //0xffffff;  0x42f4bc//QPoint m_qpRotPosOld;int m_iScloe; //滚动放大缩小尺寸//旋转double m_dRotX;double m_dRotY;double m_dRotZ;//位移double m_dMoveX;double m_dMoveY;double m_dMoveZ;//};#endif // SCENE_H

scene.cpp

#include "scene.h"
#include <cmath>Scene::Scene(Qt3DExtras::Qt3DWindow *view, QObject *parent) : QObject (parent)
{this->view=view;rootEntity = new Qt3DCore::QEntity();SetupTransformRoot(rootEntity);//view->setRootEntity(rootEntity);view->defaultFrameGraph()->setClearColor(QColor(QRgb(this->backgroudColor)));   //0x42f4bcCamera(view);StartScene();//this->initOrbitCameraController(rootEntity);//this->initFirstPersonCameraController();
}void Scene::Camera(Qt3DExtras::Qt3DWindow *view)
{//其中camera是新建的camera实体,lens表示了镜头,这个函数有着四个参数,//第一个参数是视觉域,   45.0f//第二个是分辨率(这里选择了16比9),  16.0f/9.0f//第三个参数是近面摆放位置,   0.1f//最后一个是远面放置位置,    3000.0f//后两个参数的选择当中要特别注意,只有在远近面之间的物体才会显示,所以要是想全部显示出所加入的实体,//那么近面就要足够近,远面就要足够远。// Camera//Qt3DRender::QCamera *cameraEntity = view->camera();Qt3DRender::QCamera *camera = view->camera();camera->lens()->setPerspectiveProjection(45.0f,16.0f/9.0f, 0.1f, 3000.0f);   //近面板0.1f,远面板1000.0fcamera->setViewCenter(QVector3D(-789, -2343, 10));    //0, 0, 0camera->setPosition(QVector3D(-789, -2343, 200));   //0,0,40  -200  5000  相机高度Qt3DInput::QInputAspect *input = new Qt3DInput::QInputAspect();view->registerAspect(input);//input->setCamera(cameraEntity);//使摄像机能左右转动
}void Scene::setCameraCenterPoint(QVector3D center)
{Qt3DRender::QCamera *camera = view->camera();camera->lens()->setPerspectiveProjection(45.0f,16.0f/9.0f, 0.1f, 3000.0f);   //近面板0.1f,远面板1000.0fcamera->setViewCenter(QVector3D(center.x()*1.5, center.y()*1.5, abs(center.z())));    //0, 0, 0camera->setPosition(QVector3D(center.x()*1.5, center.y()*1.5, abs(center.z())*1.5+50));   //0,0,40  -200  5000  相机高度qDebug()<<"camera point="<<camera->position();//Qt3DInput::QInputAspect *input = new Qt3DInput::QInputAspect();view->registerAspect(input);
}Qt3DCore::QEntity* Scene::findChildQEntity(QString objName,Qt3DCore::QEntity* rootEnt)
{for (Qt3DCore::QNode* childNode : rootEnt->childNodes()){QString itemName="";Qt3DCore::QEntity* testObj=dynamic_cast<Qt3DCore::QEntity*>(childNode);if(testObj){itemName=testObj->objectName();if(objName==itemName){return testObj;}}}return nullptr;
}QVector3D Scene::computCenterPoint(Qt3DCore::QEntity* first)
{QVector3D center(0, 0, 0);if(first!=nullptr){// Now iterate over all the components and calculate the center pointint totalSize=0;//for (Qt3DCore::QNode* childNode : first->childNodes()){Qt3DCore::QTransform* tranobj=dynamic_cast<Qt3DCore::QTransform*>(childNode);if(tranobj){center += tranobj->translation();totalSize+=1;}Qt3DRender::QMesh* meshobj=dynamic_cast<Qt3DRender::QMesh*>(childNode);if(meshobj){center += meshobj->geometry()->minExtent();center += meshobj->geometry()->maxExtent();totalSize+=2;}}//center /= totalSize; // compute the center point//定位相机//scene->setCameraCenterPoint(center);//}return center;
}void Scene::init3d(Qt3DExtras::Qt3DWindow *view)
{delete model;//view->defaultFrameGraph()->setClearColor(QColor(QRgb(this->backgroudColor)));Camera(view);this->StartScene();
}void Scene::StartScene()
{model = new Qt3DCore::QEntity(rootEntity);model->setObjectName("救生圈场景模型");//救生圈场景 模型   这个尺寸大小影响显示Qt3DExtras::QTorusMesh *torusMesh = new Qt3DExtras::QTorusMesh(model);torusMesh->setRadius(5);torusMesh->setMinorRadius(1);torusMesh->setRings(100);torusMesh->setSlices(20);model->addComponent(torusMesh);/*Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh(model);sphereMesh->setRadius(5);model->addComponent(sphereMesh);QString filename="C:/data/obj/Tile_+005_+006_OBJ/Tile_+005_+006/Tile_+005_+006.obj";//filename="D:\\data\\data3d\fbx\\HCZ.fbx";Qt3DRender::QMesh *mesh = new Qt3DRender::QMesh(model);mesh->setSource(QUrl::fromLocalFile(filename));mesh->setMeshName("objMesh");//mesh->setSource(QUrl("qrc:/data/obj/Tile_+005_+006_OBJ/Tile_+005_+006/Tile_+005_+006.obj"));//mesh->setSource(QUrl(filename));   //file:///model->addComponent(mesh);*///SetupTransform(model);SetupMaterial(model);SetupLighting();}void Scene::NewScene(Qt3DRender::QMesh *mesh)
{delete model;model = new Qt3DCore::QEntity(rootEntity);SetupMesh(mesh);SetupTransform(model);SetupMaterial(model);SetupLighting();
}
void Scene::NewScene2(Qt3DRender::QMesh *mesh)
{delete model;model = new Qt3DCore::QEntity(rootEntity);SetupMesh(mesh);SetupTransform(model);SetupMaterial(model);SetupLighting();
}
Qt3DCore::QEntity* Scene::addMeshEntity(Qt3DRender::QMesh *mesh)
{Qt3DCore::QEntity* newEnt = new Qt3DCore::QEntity(rootEntity);newEnt->addComponent(mesh);return newEnt;
}Qt3DCore::QEntity* Scene::addEntity(Qt3DCore::QComponent *comp)
{Qt3DCore::QEntity* newEnt = new Qt3DCore::QEntity(rootEntity);newEnt->addComponent(comp);return newEnt;
}Qt3DCore::QEntity* Scene::addNewEntity()
{return new Qt3DCore::QEntity(rootEntity);
}void Scene::SetupMesh(Qt3DRender::QMesh *mesh)
{model->addComponent(mesh);
}void Scene::SetupTransformRoot(Qt3DCore::QEntity* model)
{transform = new Qt3DCore::QTransform(model);transform->setScale3D(QVector3D(1, 1, 1));transform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), 0));//transform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(0, 1, 0), 0));//transform->setScale(1.0f);//transform->setTranslation(QVector3D(-700.0f,-2100.0f,10.0f));model->addComponent(transform);
}
void Scene::SetupTransform(Qt3DCore::QEntity* modelPrivate)
{Qt3DCore::QTransform* tf = new Qt3DCore::QTransform(modelPrivate);tf->setScale3D(QVector3D(1, 1, 1));tf->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(0, 0, 0), 0));//tf->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(0, 1, 0), 0));//tf->setScale(1.0f);//tf->setTranslation(QVector3D(-700.0f,-2100.0f,10.0f));modelPrivate->addComponent(tf);
}void Scene::SetupMaterial(Qt3DCore::QEntity* model)
{Qt3DRender::QMaterial *material = new Qt3DExtras::QPhongMaterial(model);model->addComponent(material);
}void Scene::SetupLighting()
{Qt3DCore::QEntity *lightEntity = new Qt3DCore::QEntity(rootEntity);light = new Qt3DRender::QDirectionalLight(lightEntity);light->setColor("white");light->setIntensity(1);light->setWorldDirection(QVector3D(0,0,-1));lightEntity->addComponent(light);
}//接管相机的鼠标操作 盘旋操作
void Scene::initOrbitCameraController(Qt3DCore::QEntity *ent)
{Qt3DExtras::QOrbitCameraController *controller = new Qt3DExtras::QOrbitCameraController(ent);controller->setCamera(view->camera());}
//接管相机的鼠标操作  第一人操作
void Scene::initFirstPersonCameraController(Qt3DCore::QEntity *ent)
{Qt3DExtras::QFirstPersonCameraController *controller=new Qt3DExtras::QFirstPersonCameraController(ent);controller->setCamera(view->camera());
}void Scene::paintALL()
{//对rootEntity 整体操作transform->setTranslation(QVector3D(m_dMoveX,m_dMoveY,m_iScloe));transform->setRotation(QQuaternion(sqrt(m_dRotX*m_dRotX+m_dRotY*m_dRotY),m_dRotX,m_dRotY,m_dRotZ));}//mouse wheel +/-  放大/缩小 功能
void Scene::wheelControls(QWheelEvent *event)
{float scale=2;if(event->angleDelta().x() >0 || event->angleDelta().y()>0){//放大//scale=1.1f;transform->setTranslation(QVector3D(transform->translation().x(),transform->translation().y(),transform->translation().z()+scale));}else{   //缩小//scale=0.9f;transform->setTranslation(QVector3D(transform->translation().x(),transform->translation().y(),transform->translation().z()-scale));}/*if (event->delta() < 0) {//m_iScloe--;m_iScloe=event->delta();this->paintALL();}else if (event->delta() > 0) {//m_iScloe++;m_iScloe=event->delta();this->paintALL();}*/}void Scene::mousePressControls(QMouseEvent *event)
{if(event->button()==Qt::LeftButton){}
}void Scene::mouseControls(QMouseEvent *event)
{QPoint pos = event->pos();//左键按下+move=>旋转if( event->buttons() & Qt::LeftButton){if (pos.x()  > m_qpRotPosOld.x()){m_dRotX += 1;}else if(pos.x()  < m_qpRotPosOld.x()){m_dRotX -= 1;}if(pos.y()  > m_qpRotPosOld.y()){m_dRotY += 1;}else if(pos.y()  < m_qpRotPosOld.y()){m_dRotY -= 1;}//this->paintALL();}if( event->buttons() & Qt::RightButton)             //右键{   //右键按下+move=>移动if (pos.x()  > m_qpRotPosOld.x()){m_dMoveX += 1;}else if(pos.x()  < m_qpRotPosOld.x()){m_dMoveX -= 1;}if(pos.y()  > m_qpRotPosOld.y()){m_dMoveY -= 1;}else if(pos.y()  < m_qpRotPosOld.y()){m_dMoveY += 1;}//this->paintALL();}//rotateif(event->button() & Qt::RightButton){   //mouse right press and moveing//if(event->type()==QEvent::MouseMove){//event->MouseButtonPressint dy=pos.y()-m_qpRotPosOld.y();int dx=pos.x()-m_qpRotPosOld.x();if(dy>0){transform->setRotationY(transform->rotationY()+1);}else if(dy<0){transform->setRotationY(transform->rotationY()-1);}//if(dx>0){transform->setRotationX(transform->rotationX()+1);}else if(dx<0){transform->setRotationX(transform->rotationX()-1);}}}/**///moveif(event->button() & Qt::LeftButton){   //mouse right press and moveing//if(event->type()==QEvent::MouseMove){//event->MouseButtonPressint dy=pos.y()-m_qpRotPosOld.y();int dx=pos.x()-m_qpRotPosOld.x();if(dy>0){transform->setTranslation(QVector3D(transform->translation().x(),transform->translation().y()-2,transform->translation().z()));}else if(dy<0){transform->setTranslation(QVector3D(transform->translation().x(),transform->translation().y()+2,transform->translation().z()));}if(dx>0){transform->setTranslation(QVector3D(transform->translation().x()-2,transform->translation().y(),transform->translation().z()));}else if(dx<0){transform->setTranslation(QVector3D(transform->translation().x()+2,transform->translation().y(),transform->translation().z()));}}}//旋转显示窗口//glTranslatef(m_dMoveX, m_dMoveY, m_iScloe);//glRotatef(sqrt(m_dRotX*m_dRotX+m_dRotY*m_dRotY), m_dRotY,m_dRotX,m_dRotZ);m_qpRotPosOld = pos;
}void Scene::KeyControls(QKeyEvent *event){if (event->modifiers().testFlag(Qt::ControlModifier)){//ctrl+方向键if(event->key()==Qt::Key_Up){transform->setRotationX(transform->rotationX()-6);}if(event->key()==Qt::Key_Down){transform->setRotationX(transform->rotationX()+6);}if(event->key()==Qt::Key_Left){transform->setRotationY(transform->rotationY()-6);}if(event->key()==Qt::Key_Right){transform->setRotationY(transform->rotationY()+6);}}else if (event->modifiers().testFlag(Qt::ShiftModifier)) {//shift+方向键 上/下if(event->key()==Qt::Key_Up){  //放大transform->setTranslation(QVector3D(transform->translation().x(),transform->translation().y(),transform->translation().z()-2));}if(event->key()==Qt::Key_Down){  //缩小transform->setTranslation(QVector3D(transform->translation().x(),transform->translation().y(),transform->translation().z()+2));}}else{//方向键  moveif(event->key()==Qt::Key_Up){transform->setTranslation(QVector3D(transform->translation().x(),transform->translation().y()+1,transform->translation().z()));}if(event->key()==Qt::Key_Down){transform->setTranslation(QVector3D(transform->translation().x(),transform->translation().y()-1,transform->translation().z()));}if(event->key()==Qt::Key_Left){transform->setTranslation(QVector3D(transform->translation().x()-1,transform->translation().y(),transform->translation().z()));}if(event->key()==Qt::Key_Right){transform->setTranslation(QVector3D(transform->translation().x()+1,transform->translation().y(),transform->translation().z()));}}
}void Scene::LightXChanged(int angle)
{light->setWorldDirection(QVector3D(angle,light->worldDirection().y(),light->worldDirection().z()));
}void Scene::LightYChanged(int angle)
{light->setWorldDirection(QVector3D(light->worldDirection().x(),angle,light->worldDirection().z()));
}void Scene::LightZChanged(int angle)
{light->setWorldDirection(QVector3D(light->worldDirection().x(),light->worldDirection().y(),angle));
}

本blog地址:https://blog.csdn.net/hsg77

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/209718.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2023年法国经销商Solu-Watt来访安科瑞-安科瑞 蒋静

2023年4月10日上午9点&#xff0c;法国Solu-Watt公司Matthieu先生一行到安科瑞考察参观工厂的智能化出入库工作站、柔性化仪表生产车间及实验室。自1992年以来&#xff0c;Solu-Watt在电气设备市场中不断发展。能够提供量身定制的安装有线电气解决方案&#xff08;电气柜、接线…

如何用Qt配置git项目并上传Gitee

1.进入到Qt项目文件夹内&#xff0c;打开 “Git Bash Here” 2.初始化&#xff0c;在“Git Bash Here”中输入 git init 3.加入所有文件&#xff0c;在“Git Bash Here”中输入 git add . (需要注意&#xff0c;git add 后面还有一个点) 4.添加备注&#xff0c;git com…

STL源码剖析笔记——哈希表、unordered_set、unordered_map、unordered_mutiset、unordered_mutimap

系列文章目录 STL源码剖析笔记——迭代器 STL源码剖析笔记——vector STL源码剖析笔记——list STL源码剖析笔记——deque、stack&#xff0c;queue STL源码剖析笔记——Binary Heap、priority_queue STL源码剖析笔记——AVL-tree、RB-tree、set、map、mutiset、mutimap STL源…

一套rk3588 rtsp服务器推流的 github 方案及记录 -01

我不生产代码&#xff0c;我只是代码的搬运工&#xff0c;相信我&#xff0c;看完这个文章你的图片一定能变成流媒体推出去。 诉求&#xff1a;使用opencv拉流&#xff0c;转成bgr数据&#xff0c;需要把处理后的数据&#xff08;BGR&#xff09;编码成264&#xff0c;然后推流…

字符串函数strtok

1.调用格式&#xff1a; 2.调用形式&#xff1a;char*strtok(char*p1,const char*p2),其中第二个是由分隔符组成的字符串&#xff0c;第一个为需要分隔的字符串 3.调用目的&#xff1a;将分隔符之间的字符串取出 4.调用时一般将源字符串拷贝后调用&#xff0c;因为此函数会将…

基于Unity3D 低多边形地形模型纹理贴图

在线工具推荐&#xff1a; 3D数字孪生场景编辑器 - GLTF/GLB材质纹理编辑器 - 3D模型在线转换 - Three.js AI自动纹理开发包 - YOLO 虚幻合成数据生成器 - 三维模型预览图生成器 - 3D模型语义搜索引擎 当谈到游戏角色的3D模型风格时&#xff0c;有几种不同的风格&#xf…

【工程实践】使用modelscope下载大模型文件

前言 Modelscope&#xff08;魔搭社区&#xff09;是阿里达摩院的一款开源模型平台&#xff0c;里面提供了很多的热门模型供使用体验&#xff0c;其中的模型文件可以通过git clone 快速下载。并且为模型提供了Notebook的快速开发体验&#xff0c;使用阿里云服务&#xff0c;不需…

【优选算法系列】【专题二滑动窗口】第三节.904. 水果成篮和438. 找到字符串中所有字母异位词

文章目录 前言一、水果成篮 1.1 题目描述 1.2 题目解析 1.2.1 算法原理 1.2.2 代码编写 1.2.3 题目总结二、找到字符串中所有字母异位词 2.1 题目描述 2.2 题目解析 2.2.1 算法原理 2.2.2 代码编写 …

SAP UI5 walkthrough step9 Component Configuration

在之前的章节中&#xff0c;我们已经介绍完了MVC的架构和实现&#xff0c;现在我们来讲一下&#xff0c;SAPUI5的结构 这一步&#xff0c;我们将所有的UI资产从index.html里面独立封装在一个组件里面 这样组件就变得独立&#xff0c;可复用了。这样&#xff0c;无所什么时候我…

队列的实现

学习就像一段长跑&#xff0c;比的不是谁跑得快&#xff0c;而是谁更能坚持&#xff01;&#xff01; 1 队列的概念及结构 队列&#xff1a;只允许在一端进行插入数据操作&#xff0c;在另一端进行删除数据操作的特殊线性表&#xff0c;队列具有先进先出 FIFO(First In First O…

外网访问内网服务器使用教程

如何在任何地方都能访问自己家里的笔记本上的应用&#xff1f;如何让局域网的服务器可以被任何地方访问到&#xff1f;有很多类似的需求&#xff0c;我们可以统一用一个解决方案&#xff1a;内网穿透。内网穿透的工具及方式有很多&#xff0c;如Ngrok、Ssh、autossh、Natapp、F…

特殊进程之守护进程

文章目录 1、守护进程的概念2、如何查看守护进程3、编写守护进程的步骤3.1 创建子进程&#xff0c;父进程退出3.2 在子进程中创建新会话3.3 改变当前工作目录3.4 重设文件权限掩码3.5 关闭不需要的文件描述符3.6 某些特殊的守护进程打开/dev/null 4、守护进程代码示例 1、守护进…

[UNILM]论文实现:Unified Language Model Pre-training for Natural Language.........

文章目录 一、完整代码二、论文解读2.1 介绍2.2 架构2.3 输入端2.4 结果 三、过程实现四、整体总结 论文&#xff1a;Unified Language Model Pre-training for Natural Language Understanding and Generation 作者&#xff1a;Li Dong, Nan Yang, Wenhui Wang, Furu Wei, Xia…

MyBatis--07--启动过程分析、SqlSession安全问题、拦截器

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 谈谈MyBatis的启动过程具体的操作过程如下&#xff1a;实现测试类,并测试SqlSessionFactorySqlSession SqlSession有数据安全问题?在MyBatis中&#xff0c;SqlSess…

vuex如何存储数据、获取数据、以及数据的持久化

前提必须已经在vue中安装了vuex插件不然无法使用&#xff0c;不知道怎么创建vue和安装vuex的可以看这个视频&#xff0c;node.js版本最好16以上不然可能会安装失败&#xff1a;30分钟学会Vue之VueRouter&Vuex 趁着暑假掌握一门技能 大学生前端实习毕业设计必备技能_哔哩哔哩…

好代码资源网整站打包代码(包含了最新数据),集成了深度二开的ripro主题,非常适合做资源网站创业用

好代码资源网是基于wordpress开发的一个资源分享类网站&#xff0c;在开发者圈子里还算小有名气&#xff0c;这里分享婴整站打包代码&#xff08;包含了最新数据&#xff09;。网站本身集成了深度二开的ripro主题&#xff0c;非常适合做资源网站创业用。 资源下载类网站目前还…

Button背景颜色改不了,一直是默认的紫色

使用android.widget.Button <android.widget.Buttonandroid:layout_width"wrap_content"android:layout_height"wrap_content"android:onClick"doClick"android:text"这是一个按钮"android:textColor"color/black"androi…

kubesphere安装后启用DevOps

官方文档&#xff1a;KubeSphere DevOps 系统 1、集群管理---定制资源定义 进入目录&#xff1a;集群管理---定制资源定义搜索&#xff1a;clusterconfiguration 点击 ks-installer 右侧的 &#xff0c;选择编辑 YAML 在该 YAML 文件中&#xff0c;搜索 devops&#xff0c;…

No CUDA GPUs are available

文章目录 前言尝试方法一、尝试方法一二、尝试方法二 总结 前言 之前用服务器跑的时候&#xff0c;发现是可以跑的。但当有其他人一同使用的时候&#xff0c;就会抛出&#xff1a;No CUDA GPUs are available&#xff0c;这个时候我尝试了以下两种方式解决&#xff0c;后面终于…

一到冬天,助听器出现声音小、无声、时有时无……

冬天是一个寒冷干燥的季节&#xff0c;对于助听器的使用者来说&#xff0c;也是一个需要特别注意保养的季节。助听器是高精密的电子产品&#xff0c;如果不注意保养&#xff0c;可能会出现声音小、无声、时有时无等故障&#xff0c;影响听力康复的效果。那么&#xff0c;冬天我…