添加QPushButton图标左对齐的示例
This commit is contained in:
14
QProxyStyleTest/menubtnstyle.h
Normal file
14
QProxyStyleTest/menubtnstyle.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef MENUBTNSTYLE_H
|
||||
#define MENUBTNSTYLE_H
|
||||
|
||||
#include <QProxyStyle>
|
||||
#include <QIcon>
|
||||
|
||||
class MenuBtnStyle : public QProxyStyle
|
||||
{
|
||||
public:
|
||||
void drawControl(ControlElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget = nullptr) const override;
|
||||
};
|
||||
|
||||
#endif // MENUBTNSTYLE_H
|
||||
Reference in New Issue
Block a user