当前位置:网站首页>Hmi-31- [motion mode] solve the problem of picture display of music module
Hmi-31- [motion mode] solve the problem of picture display of music module
2022-07-05 02:21:00 【DreamLife.】
HMI-31-【 Sports mode 】 Solve the problem of picture display of music module
In the previous , We have basically realized the layout display of the music module , But left a small tail , Is the picture display , In this module , The picture is not square , But with perspective , But what? ,Qt Image display of , I haven't studied so deeply , So at present, it can only be like , But it's definitely not true perspective . I use mask to realize , In fact, it is a flat picture , Just use a perspective picture template to cover it .
keyword :
HMI
、Perspective graphics
、Mask
、setMask
、Qt
Create a new picture module and realize the irregular display of the window
Here in order to achieve this perspective effect , Two parts are needed to realize , The first is the irregular display of the window , One is to mask the image . So you need to create a new QWidget To achieve . On the layout , Use one lable To realize irregular window background , The display of the sum window is realized according to the image of this background .
Code
this->setAttribute(Qt::WA_TranslucentBackground);
Set image mask code :
QPixmap pix;
pix.load(":/Sport/Resources/MeterDisplay/Sport/MDSR/Music/mask.png");
ui->label_back->setMask(pix.mask());
I want to introduce an interface , You can update the picture , The code is as follows
/**
* @brief MDS_Right_Music_PicMask::setPicUrl
* @param url
* Set pictures url
*/
void MDS_Right_Music_PicMask::setPicUrl(QString url)
{
ui->label_back->setStyleSheet(QString("border-image: url(%1);").arg(url));
ui->label_back->update();
}
Current progress
The first stage of achievement display
At present, to complete HUD Interface and interface development , LCD instrument comfort mode development . It's shown as follows :
The most handsome in the whole network Qt Develop Geely Auto instrument
explain :
The reference prototype used in this project comes from :[ geely ] borui GE | Meter HMI Design 、 Geely HMI project .
The ownership and interpretation of the design drawings belong to Geely Automobile .
All resource documents of the project have ** The immortal Xiaohai ** Reproduction production .
The code of this project will not be open source for the time being , If you need the source code, please contact me , QR code in the upper left corner plus wechat .
This program is limited to learning and communication 、 Commercial use is prohibited .
.
The code of this project will not be open source for the time being , If you need the source code, please contact me , QR code in the upper left corner plus wechat .
This program is limited to learning and communication 、 Commercial use is prohibited .
边栏推荐
- Introduce reflow & repaint, and how to optimize it?
- Comment mettre en place une équipe technique pour détruire l'entreprise?
- Application and development trend of image recognition technology
- Prometheus monitors the correct posture of redis cluster
- Win: add general users to the local admins group
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Talk about the things that must be paid attention to when interviewing programmers
- Can you really learn 3DMAX modeling by self-study?
- Rabbit MQ message sending of vertx
- openresty ngx_ Lua variable operation
猜你喜欢
Learn game model 3D characters, come out to find a job?
Exploration of short text analysis in the field of medical and health (I)
[download white paper] does your customer relationship management (CRM) really "manage" customers?
Icu4c 70 source code download and compilation (win10, vs2022)
The most powerful new household god card of Bank of communications. Apply to earn 2100 yuan. Hurry up if you haven't applied!
He was laid off.. 39 year old Ali P9, saved 150million
openresty ngx_lua执行阶段
Practical case of SQL optimization: speed up your database
【LeetCode】110. Balanced binary tree (2 brushes of wrong questions)
A label colorful navigation bar
随机推荐
Do you know the eight signs of a team becoming agile?
PowerShell:在代理服务器后面使用 PowerShell
Uniapp navigateto jump failure
【附源码】基于知识图谱的智能推荐系统-Sylvie小兔
Grpc message sending of vertx
When to catch an exception and when to throw an exception- When to catch the Exception vs When to throw the Exceptions?
Visual studio 2019 set transparent background (fool teaching)
Win:使用 Shadow Mode 查看远程用户的桌面会话
Some query constructors in laravel (2)
Practical case of SQL optimization: speed up your database
Bert fine tuning skills experiment
JVM - when multiple threads initialize the same class, only one thread is allowed to initialize
使用druid連接MySQL數據庫報類型錯誤
Pytorch register_ Hook (operate on gradient grad)
Limited query of common SQL operations
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
Win:使用 PowerShell 检查无线信号的强弱
如何搭建一支搞垮公司的技术团队?
Action News
Win:将一般用户添加到 Local Admins 组中