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

边栏推荐
- Serious bugs with lifted/nullable conversions from int, allowing conversion from decimal
- runc hang 导致 Kubernetes 节点 NotReady
- Open source SPL optimized report application coping endlessly
- 【LeetCode】501. Mode in binary search tree (2 wrong questions)
- Subject 3 how to turn on the high beam diagram? Is the high beam of section 3 up or down
- Summary and practice of knowledge map construction technology
- Interesting practice of robot programming 15- autoavoidobstacles
- Win:使用 Shadow Mode 查看远程用户的桌面会话
- Application and development trend of image recognition technology
- Redis' hyperloglog as a powerful tool for active user statistics
猜你喜欢
openresty ngx_ Lua execution phase
openresty ngx_lua执行阶段
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Tucson will lose more than $400million in the next year
Grub 2.12 will be released this year to continue to improve boot security
Do you know the eight signs of a team becoming agile?
官宣!第三届云原生编程挑战赛正式启动!
Three properties that a good homomorphic encryption should satisfy
Missile interception -- UPC winter vacation training match
随机推荐
丸子百度小程序详细配置教程,审核通过。
Codeforces Round #770 (Div. 2) ABC
Advanced learning of MySQL -- Application -- Introduction
Tla+ through examples (XI) -- propositional logic and examples
[source code attached] Intelligent Recommendation System Based on knowledge map -sylvie rabbit
Missile interception -- UPC winter vacation training match
Naacl 2021 | contrastive learning sweeping text clustering task
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
JVM's responsibility - load and run bytecode
Traditional chips and AI chips
Kotlin - coroutine
Binary tree traversal - middle order traversal (golang)
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
RichView TRVStyle MainRVStyle
Pytorch register_ Hook (operate on gradient grad)
Prometheus monitors the correct posture of redis cluster
[illumination du destin - 38]: Ghost Valley - chapitre 5 Flying clamp - one of the Warnings: There is a kind of killing called "hold Kill"
Practical case of SQL optimization: speed up your database
R language uses logistic regression and afrima, ARIMA time series models to predict world population