当前位置:网站首页>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 .
边栏推荐
- Codeforces Global Round 19 ABC
- Pytorch register_ Hook (operate on gradient grad)
- I use these six code comparison tools
- Data guard -- theoretical explanation (III)
- Comment mettre en place une équipe technique pour détruire l'entreprise?
- Timescaledb 2.5.2 release, time series database based on PostgreSQL
- Learn game model 3D characters, come out to find a job?
- Outlook: always prompt for user password
- The steering wheel can be turned for one and a half turns. Is there any difference between it and two turns
- How to find hot projects in 2022? Dena community project progress follow-up, there is always a dish for you (1)
猜你喜欢
He was laid off.. 39 year old Ali P9, saved 150million
[Digital IC hand tearing code] Verilog edge detection circuit (rising edge, falling edge, double edge) | topic | principle | design | simulation
How to build a technical team that will bring down the company?
Go RPC call
Win:使用 Shadow Mode 查看远程用户的桌面会话
Marubeni Baidu applet detailed configuration tutorial, approved.
Tucson will lose more than $400million in the next year
R语言用logistic逻辑回归和AFRIMA、ARIMA时间序列模型预测世界人口
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
丸子百度小程序详细配置教程,审核通过。
随机推荐
Missile interception -- UPC winter vacation training match
Li Kou Jianzhi offer -- binary tree chapter
Visual studio 2019 set transparent background (fool teaching)
[uc/os-iii] chapter 1.2.3.4 understanding RTOS
Summary of regularization methods
How to make a cool ink screen electronic clock?
[technology development-26]: data security of new information and communication networks
CAM Pytorch
Chinese natural language processing, medical, legal and other public data sets, sorting and sharing
Restful fast request 2022.2.1 release, support curl import
Word processing software
Last week's hot review (2.7-2.13)
[download white paper] does your customer relationship management (CRM) really "manage" customers?
Win:使用组策略启用和禁用 USB 驱动器
Yolov5 model training and detection
Practical case of SQL optimization: speed up your database
Binary tree traversal - middle order traversal (golang)
Interesting practice of robot programming 15- autoavoidobstacles
Three properties that a good homomorphic encryption should satisfy
Exploration of short text analysis in the field of medical and health (I)