当前位置:网站首页>After adding qmenu to qtoolbutton and QPushButton, remove the triangle icon in the lower right corner
After adding qmenu to qtoolbutton and QPushButton, remove the triangle icon in the lower right corner
2022-04-23 05:28:00 【Oriental forgetfulness】
QToolButtom and QPushButtom add to QMenu The icon in the lower right corner will appear ,
QMenu* menu = new QMenu(this);
QAction* ac1 = new QAction(“1”,menu);
QAction* ac2 = new QAction(“2”,menu);
menu->addAction(ac1);
menu->addAction(ac2);
QToolButton* m_btn = new QToolButton(this);
m_btn->setPopupMode(QToolButton::InstantPopup);
m_btn->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
m_btn->setMenu(menu);
Here's the picture .
The removal method is as follows :
m_btn->setStyleSheet(“QToolButton::menu-indicator{image:none;}”);
版权声明
本文为[Oriental forgetfulness]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220543307422.html
边栏推荐
- (11) Vscode code formatting configuration
- Qingdao agile tour, coming!
- Source code analysis of how to use jump table in redis
- what is wifi6?
- Redis in node -- ioredis
- Error handling mechanism of the strongest egg framework in history
- C# ,类库
- 如果我是pm之 演出电影vr购票展示
- Parsing of string class intern() method
- Differences between auto and decltype inference methods (learning notes)
猜你喜欢
Uncle wolf is looking for a translator -- Plato -- ongoing translation
Requirements for SQL server to retrieve SQL and user information
Top 25 Devops tools in 2021 (Part 2)
Kanban Quick Start Guide
Low code and no code considerations
[triangle Yang Hui triangle printing odd even cycle JS for break cycle]
How to add beautiful code blocks in word | a very complete method to sort out and compare
双击.jar包无法运行解决方法
Three 之 three.js (webgl)旋转属性函数的简单整理,以及基于此实现绕轴旋转的简单案例
Laravel routing job
随机推荐
Top 25 Devops tools in 2021 (Part 2)
五一劳动节期间什么理财产品会有收益?
The introduction of lean management needs to achieve these nine points in advance
Study notes: unity customsrp-13-colorgrading
Note: unordered_ Understanding and use of map
Call the interface to get the time
Arithmetic and logical operations
Devops life cycle, all you want to know is here!
Graphics.FromImage报错“Graphics object cannot be created from an image that has an indexed pixel ...”
Knowledge of egg testing -- mock, Supertest, coffee
The address value indicated by the pointer and the value of the object indicated by the pointer (learning notes)
If the route reports an error after deployment according to the framework project
Laravel [view]
Uncle wolf is looking for a translator -- Plato -- ongoing translation
跨域CORS的情缘~
Multi process model in egg -- egg document Porter
After NPM was upgraded, there was a lot of panic
How to set the initial value of El input number to null
!!!!!!!!!!!!!!!!!!
What are the most popular recruitment technical skills in 2022? You can't think of it