QtExamples/ExChangeSVGColor/widget.h

33 lines
614 B
C
Raw Permalink Normal View History

2022-07-30 20:20:17 +08:00
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QPushButton>
#include <QToolButton>
class QDomElement;
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
// QWidget interface
protected:
virtual void paintEvent(QPaintEvent *event) override;
2023-03-10 01:31:08 +08:00
public slots:
void onBtnChecked(bool checked);
2022-07-30 20:20:17 +08:00
private:
QToolButton* m_btn;
QToolButton* m_btn2;
2023-03-10 01:31:08 +08:00
const int m_width = 100;
2022-07-30 20:20:17 +08:00
};
void SetAttrRecur(QDomElement &elem, QString strtagname, QString strattr, QString strattrval);
#endif // WIDGET_H