当前位置:网站首页>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
边栏推荐
- How to realize adaptive layout
- Project manager's thinking mode worth trying: project success equation
- node中的redis使用--ioredis
- Laravel database
- Ehcache Memcache redis three caches
- Uniapp hot update with progress bar
- Devops life cycle, all you want to know is here!
- What are the reasons for the failure of digital transformation?
- Create cells through JS (while loop)
- Why can't V-IF and V-for be used together
猜你喜欢

双击.jar包无法运行解决方法

Cloud computing and cloud native architecture design of openshift

The introduction of lean management needs to achieve these nine points in advance

Kanban Quick Start Guide

What role do tools play in digital transformation?

Three 之 three.js (webgl)简单实现根据点绘制线/弧线(基于LineGeometry / Line2 / LineMaterial,绘制两点基于圆心的弧线段)

uni使用的一些坑

Requirements for SQL server to retrieve SQL and user information

Cross domain CORS relationship~

C test calls the paddlesharp module to recognize pictures and words
随机推荐
Why can't V-IF and V-for be used together
Create process memory management copy_ Mm - processes and threads (IX)
!!!!!!!!!!!!!!!!!!
Watch depth monitoring mode
2021-11-01
egg中的多进程模型--egg文档搬运工
2021-10-08
d. TS --- for more detailed knowledge, please refer to the introduction on the official website (chapter of declaration document)
Good test data management, in the end how to do?
The 2021 IT industry project management survey report was released!
创建进程内存管理copy_mm - 进程与线程(九)
狼叔来找翻译人员了--plato--持续翻译中.....
弘玑Cyclone RPA为国金证券提供技术支撑,超200个业务场景实现流程自动化
Three of three JS (webgl) simple sorting of rotation attribute function, and a simple case of rotating around the axis based on this
Create a tabbar component under the components folder, which is public
WTL 自绘控件库 (CQsCheckComboxBox)
How to add beautiful code blocks in word | a very complete method to sort out and compare
Click the Add button - a box appears (similar to adding learning experience - undergraduate - Graduate)
Graphics. Fromimage reports an error "graphics object cannot be created from an image that has an indexed pixel..."
史上最强egg框架的error处理机制