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

边栏推荐
- Application and Optimization Practice of redis in vivo push platform
- STL container
- Outlook: always prompt for user password
- Abacus mental arithmetic test
- 【LeetCode】501. Mode in binary search tree (2 wrong questions)
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- February database ranking: how long can Oracle remain the first?
- Yolov5 model training and detection
- Win:将一般用户添加到 Local Admins 组中
- One plus six brushes into Kali nethunter
猜你喜欢

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

Stored procedure and stored function in Oracle

openresty ngx_lua執行階段

Security level

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

【LeetCode】111. Minimum depth of binary tree (2 brushes of wrong questions)

Single line function*

【LeetCode】222. The number of nodes of a complete binary tree (2 mistakes)

Traditional chips and AI chips

The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
随机推荐
A label making navigation bar
From task Run get return value - getting return value from task Run
Start the remedial work. Print the contents of the array using the pointer
openresty ngx_lua執行階段
How to find hot projects in 2022? Dena community project progress follow-up, there is always a dish for you (1)
179. Maximum number - sort
Asynchronous and promise
丸子百度小程序详细配置教程,审核通过。
Leetcode takes out the least number of magic beans
Interesting practice of robot programming 15- autoavoidobstacles
Prometheus monitors the correct posture of redis cluster
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
如何搭建一支搞垮公司的技術團隊?
Practice of tdengine in TCL air conditioning energy management platform
Runc hang causes the kubernetes node notready
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
Win: enable and disable USB drives using group policy
[Yu Yue education] National Open University spring 2019 0505-22t basic nursing reference questions
spoon插入更新oracle数据库,插了一部分提示报错Assertion botch: negative time
Abacus mental arithmetic test