当前位置:网站首页>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 .

边栏推荐
- Visual studio 2019 set transparent background (fool teaching)
- Advanced learning of MySQL -- Application -- Introduction
- Blue bridge - maximum common divisor and minimum common multiple
- February database ranking: how long can Oracle remain the first?
- From task Run get return value - getting return value from task Run
- He was laid off.. 39 year old Ali P9, saved 150million
- Flutter 2.10 update details
- How to make a cool ink screen electronic clock?
- Tla+ through examples (XI) -- propositional logic and examples
- Win:将一般用户添加到 Local Admins 组中
猜你喜欢

Exploration of short text analysis in the field of medical and health (II)

如何搭建一支搞垮公司的技術團隊?

Practice of tdengine in TCL air conditioning energy management platform

Visual explanation of Newton iteration method

Comment mettre en place une équipe technique pour détruire l'entreprise?

The steering wheel can be turned for one and a half turns. Is there any difference between it and two turns

Security level

Restful Fast Request 2022.2.1发布,支持cURL导入
![[Digital IC hand tearing code] Verilog edge detection circuit (rising edge, falling edge, double edge) | topic | principle | design | simulation](/img/9e/4c8557bb4b75b1e74598dedb24af86.jpg)
[Digital IC hand tearing code] Verilog edge detection circuit (rising edge, falling edge, double edge) | topic | principle | design | simulation

Variables in postman
随机推荐
如何搭建一支搞垮公司的技術團隊?
February database ranking: how long can Oracle remain the first?
RichView TRVUnits 图像显示单位
Exploration of short text analysis in the field of medical and health (II)
Openresty ngx Lua Execution stage
Comment mettre en place une équipe technique pour détruire l'entreprise?
[illumination du destin - 38]: Ghost Valley - chapitre 5 Flying clamp - one of the Warnings: There is a kind of killing called "hold Kill"
Introduce reflow & repaint, and how to optimize it?
100 basic multiple choice questions of C language (with answers) 04
Chinese natural language processing, medical, legal and other public data sets, sorting and sharing
JVM - when multiple threads initialize the same class, only one thread is allowed to initialize
Matrixone 0.2.0 is released, and the fastest SQL computing engine is coming
Use the difference between "Chmod a + X" and "Chmod 755" [closed] - difference between using "Chmod a + X" and "Chmod 755" [closed]
Practical case of SQL optimization: speed up your database
LeetCode 314. Binary tree vertical order traversal - Binary Tree Series Question 6
Day_ 17 IO stream file class
Li Kou Jianzhi offer -- binary tree chapter
Vulnstack3
The steering wheel can be turned for one and a half turns. Is there any difference between it and two turns
Talk about the things that must be paid attention to when interviewing programmers